British consumers will be able to ask social media giants like Facebook to delete embarrassing posts under new data protection legislation.