Use method call to see if processes left

This refactors checking whether a jobtype still has running processes
left during shutdown.  Instead of looking into JobType's internal data
structures, we now ask it (by calling a method) if it has running
processes.

This increases modularity and separation of concerns (i.e. loose
coupling).
Public methods should have doc strings, even for simple code.