Magistrates have been told to stop authorising warrants for energy firms to forcibly install prepayment meters.