fixed a number of issues found by Coverity

Added "unsafe" methods for accessing fields and methods in classes. Instead of throwing an exception when the target field/method does not exist, these methods return null. This allows more efficient handling of cases in which one previously had to call declaresField and then getField. This is now not only shorter to write, but also saves the second iteration over the internal collections.