Performance improvements to krun

* stream outputs directly to and from files in many cases to save memory usage
* remove old --output raw so that the java backend does not invoke the unparser unnecessarily.
* other minor performance enhancements

**do not review yet**