Fix #1664 for Hash#compare_by_identity and Hash#store

https://github.com/jruby/jruby/issues/1664

Test in RubySpec:
https://github.com/rubyspec/rubyspec/pull/274
ArrayJavaProxy#to_a now returns nested arrays where applicable
Merge pull request #1673 from tduehr/to_a

ArrayJavaProxy#to_a now returns nested arrays where applicable
Merge pull request #1666 from godfat/jruby-1_7-no-copy-for-compare_by_identity

Fix #1664 for Hash#compare_by_identity and Hash#store