US singer Chris Brown has been released on bail by a judge in London - and must pay a £5m security fee to the court.