(#2890) - websql: avoid hex() for binaries

See #2899 for backstory. Rebased on #2818 because I didn't want to bitrot myself.

For a demonstration, compare these two blocks: [before](http://bl.ocks.org/nolanlawson/raw/73f15f3fe612b8770e79/) and [after](http://bl.ocks.org/nolanlawson/raw/11b1af329e1f8f27fa13/). The difference should be obvious.

Using `hex()` was a nice hack, but decoding hex strings in JavaScript is slow. Apparently just using `replace()` to swap out the `\u0000` is much faster. I borrowed @neojski's trick from pouch-collate for this.