Reworked to support JSON broken into chunks

* Added random splitting into chunks to the test backend.
* Rewritten the frontend networking part to support JSON received in
more than one chunk.
* Added documentation to the refactored frontend parts.
I just wanted to speed up finding a correct JSON string (which is anyways parsed by `JSON.parse`, and if that fails, looks for the next shorter string to parse). Sorry for confusion. This is no way a JSON parser.

`{foo:["bar]}"]}` should be all right, it will find the last `}` as a pair to `{` and then forward it to `JSON.parse` which will correctly handle everything else. If not, then we have an incomplete JSON string and should wait for additional data.

I could use a full-featured streaming JSON parser like I've shown you before, but I had no Internet connection to contact `npm` when I'd been writing this.