merge YARN-805 from branch-2. Fix javadoc and annotations on classes in the yarn-api package. Contributed by Jian He.