Lyft Inc. has agreed to buy London black cab app Gett, its third acquisition in the past year, as the company works to expand its presence beyond the US.