Pull ConstantCache out and add utility for checking it.
Check for opthash being null. Fixes #1007.
Merge branch 'master' of jruby.org:jruby