Former British bantamweight champion John Donnelly has been banned from boxing for two years over a doping violation.