Add -Werror and -Xlint:all and fix warnings