add a hash typecaster

Similar to the array typecaster pull request, this adds a type Hash typecaster. Can additionally take in JSON of a Hash and deserialize.