OBMFULL-5613 Comparator implementations should be Serializable.

This is trivially done and allows structures like Treemaps using these
comparators to be themselves Serializable.
OBMFULL-5613 Fixes potential NPEs.
OBMFULL-5613 Classes with a clone() method implement Cloneable.
OBMFULL-5613 Optimizes away useless boxing-and-unboxing.
OBMFULL-5613 Adds missing final modifiers on static fields.
OBMFULL-5613 Don't use new String() when you mean "".
OBMFULL-5613 Don't use == when you mean equals()
OBMFULL-5613 Fixes wrong String.format() placeholder.
OBMFULL-5613 Fixes spurious null check
OBMFULL-5613 Use Integer.valueOf and not new Integer().
OBMFULL-5613 Remove useless assign.
OBMFULL-5613 Optimizes string building.
OBMFULL-5613 Enum.valueOf() exceptions should be caught.

Enum.valueOf() does not return null in case of problems, it throws runtime
exceptions. Don't null check.
OBMFULL-5613 Possibly invalid call to abs().
OBMFULL-5613 Useless trim() on immutable string.
OBMFULL-5613 Don't throw null, it hurts.
OBMFULL-5613 Actually useful error message.
OBMFULL-5613 Removes useless call to new String().
OBMFULL-5613 Use static inner classes when possible.
OBMFULL-5613 Fields without setters can be final.