For Facebook, the collaboration represents a step in the development of an all-purpose communications app, while Uber stands to gain new customers.