Hot fixes: file sub stream: stored return position, in memory stream: close takes on flag, to close or reset

1. File sub stream: new file stream is created with restore point read from "ftell()"
2. In memory sub stream takes on flag, in case of error, the "close" resets, and keeps the contents, other case, delete contents and associated data structure.
3. A lot of memory violation fixes.