Add object hashing callback and ws_object_hash() function

This PR adds the possibility to hash an object.

It also provides a _very_ basic "hashing" function for the object type itself.