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

Argh, damn. You are right. The deprecation message was caused by me not using the API correctly:

```
D.scala:4: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
 ^
one warning found
```