Address FindBugs issues and disable some detectors

This commit fixes enough FindBugs issues and disables enough detectors for `mvn findbugs:check` to pass.
This is not quite the same, though, is it? Although I assume the instanceof check is actually what we want...