refactor: comments/annotations for Java

Removes duplicate code to generate comments/annotations.

When generating comments, newlines are appended only if necessary, which
removes unnecessary newlines in the output.

Bug: none
Test: aidl_unittests
Change-Id: I1df1302300e07045bab4d02b0f61b21b1152b5ae
21 files changed