Former tennis world number one Maria Sharapova has revealed she failed a drug test at the Australian Open.