io: rework io.popen to use posix_spawn()

..and accept 'rw' flag to make reading _and_
writing to the process' stdin and stdout possible.
io: add io.streamfile()