Mostly cosmetic fixes identified through static analysis

- Mark classes that declare clone() without CloneNotSupportedException
  as final

- Remove redundant type casts

- Remove throws declaration of exceptions not thrown

- Follow modified order recommended by the Java language spec

- Simplify if/return statement combinations (often the if is
  unncessary and the code becomes simpler to read without).

- Remove redundant semicolons

- Remove redundant array instantiations

- Make fields final if possible

- Don't use instance reference to refer to static fields

- Don't use default IntelliJ templates