Add getHash to core

getHash uses JSON.stringify with a callback to make ordering predictable. It can be used to produce stable hashes of JavaScript objects.