Change com and iframe to use hashData for encoding/decoding of the hash

The url-fragment appended to the iframe src was encoded in iframe.js and decoded in com. This moves the encoding and decoding to the same module, and adds test coverage.