Option to source input streams.

A certain framework I am using likes to mess up class loaders. Resources
work only through the framework's own functions, so sourcing from stream
is useful.
Fixes the "wait for message" function.

The message is now specified at process startup and monitoring is
started before the process is started. This ensures that the message is
never missed.

TODO: Wait for multiple messages? Add signaling to isAlive and get rid
of all polling?