(Reuters) - Ebay Inc will buy payment gateway Braintree for about $800 million to strengthen its PayPal unit's presence on mobile devices and take out a rapidly growing rival.