Implement getStateKeyVal for JS bindings.

Gives JS the option to 'loop' over contract key/val storage