SI-8574 Copy @SerialVersionUID, etc, to specialized subclasses

The test case demonstrates that this is important for serialization
and for strictfp. (Although the latter is still pretty broken,
see SI-7954.)

The synthetic subclass doesn't take a copy of the `@deprecated`
annotation, however, as this results in extra warnings in
some existing test cases, such as run/t3888.scala.