SI-4788/SI-5948 Respect RetentionPolicy of Java annotations

Note that I removed the check to ignore @deprecated:
- @deprecated extends StaticAnnotation, so they aren't
  supposed to show up in the RuntimeInvisibleAnnotation
  attribute anyway, and the earlier check for "extends
  ClassfileAnnotationClass" makes this check superflous
  anyway.
- Otherwise, if @deprecated was extending
  ClassfileAnnotationClass it would seem inconsistent
  that we don't emit @deprecated, but would do so for
  @deprecatedOverriding, @deprecatedInheritance, etc.
  Anyway, due to ClassfileAnnotation not working in
  Scala, and the additional check which only allows
  Java-defined annotations, this is pretty pointless
  from every perspective.
Merge pull request #4026 from soc/SI-4788-new

SI-4788/SI-5948 Respect RetentionPolicy of Java annotations