Add and move more tests, and add base64 streaming when writing byte arrays in JSON, and fix bugs in converting from float and double to integers