Comcast beat Rupert Murdoch's Twenty-First Century Fox in the battle for British broadcaster Sky, after offering $40 billion in a dramatic auction.