TEZ-1304. Abstract out client interactions with YARN. Contributed by
Jonathan Eagles.