merge YARN-383 from trunk. AMRMClientImpl should handle null rmClient in stop(). Contributed by Hitesh Shah.