Patch for Bugs 827538 and 738388

Couple patches for concurrency issues:

827538 - ConcurrentModificationException in NativeJavaMethod
https://bugzilla.mozilla.org/show_bug.cgi?id=827538

738388 - ClassCache non thread-safe use of HashMap
https://bugzilla.mozilla.org/show_bug.cgi?id=738388