A tie-up is agreed that will create one of the UK’s largest mobile, broadband and media firms.