Electrochemical bromination of late stage intermediates and drug molecules