The deal will give world’s richest man control of influential social media platform with more than 230m users.