HMRC has confirmed that thousands were locked out of their National Insurance contribution system due to an error