YARN-2938. Fixed new findbugs warnings in hadoop-yarn-resourcemanager and hadoop-yarn-applicationhistoryservice. Contributed by Varun Saxena.

(cherry picked from commit 241d3b3a50c6af92f023d8b2c24598f4813f4674)
HADOOP-11039. ByteBufferReadable API doc is inconsistent with the implementations. (Yi Liu via Colin P. McCabe)
(cherry picked from commit 249cc905017948d64aab3d14d7a64df3b7b35a13)
Merge remote-tracking branch 'remotes/origin/branch-2' into branch-2