refactor ProgramLoader, RunProcess to remove static state

**please review**
There is a very good reason for doing it this way which is that it allows mocking of this very large dependency. In general, the paradigm of dependency injection is that wherever possible, a class should be constructed with only its direct dependencies. There are places in some of my diffs where doing that would be unmanageable with the code as it currently exists, but this is not one of those cases.