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
Should we include append if destUri is not set?  Seems this is an api extension that should not have visible side effects unless the developer has chosen to use it.

I don't think this is harmful in most cases, but its simple enough to move inside the below `if`.