sockets.tcp - redirect to file for Android and iOS

- set `destUri` to non-empty string will open outputStream
- set `destUrl` to empty string will close outputStream
- `close` and `disconnect` will close outputStream
- ~~`readyToRead` is not set to `false` after sending receive event~~ `readToRead` is ignored for redirect to file
- Fixed some style issues from other code reviews
Taking a second look, even if onReceive is called before the full response is processed the test should still pass. (its comparing length of file to length of current read reported, not the length of total read expected).

I think thats fine for an auto test.