Two of the world's biggest coffee firms are to combine as the industry grapples with tariffs and high prices for beans.