JS backend: make string hash compatible with Rhino
JS backend: internal consistency tests for hashCode

TODO: Rhino doesn't have ArrayBuffer, we'll need to redo *ToIntBits.