David Cameron apologises for legislation banning promotion of homosexuality to children