Adds JSR305 @Nullable and @Nonnull annotations throughout, and fixes issues found by FindBugs.