bail legal definition