Gary Lineker has won a tax battle against HM Revenue and Customs after being accused of underpaying nearly £5mn in tax.