Sir Elton John has received an apology from the UK government after it accidentally published his address online.