Added more control over input to doxygen to support multi-module
projects better

With large outputs from Doxygen it was noticed that the java process
hung. This is likely due to the streams getting stuck so split them into
different threads.

This prevents the main thread getting stuck if the outputs lock up.