Fix stream management to work with new packages

Recent packages (oracle mysql 5.6) have some strange behaviour related
to stdout/stderr. Switching the streams to stdout only for the apt-calls
appears to resolve this.

Failed package installs should still be caught by the exit code checking
at the end of the install.
The new one is overloaded to accept a stringstream.