Bugfix to properly read the stoptimeout from xml + new option to shutdown parent process first

Bugfix: stoptimeout config option specified in config xml is not used. The stoptimeout always defaults to 15 seconds
Feature: Add stopparentprocessfirst option, which controls the order of shutdown. The default it to shutdown child processes first. This may be a problem, if the child processes need to be shutdown gracefully. When stopparentprocessfirst is set to true, the Ctrl+C command will be sent to the parent process first, and then to child processes. The advantage is that if the parent process receives the shutdown command, it can notify child processes to shutdown gracefully.
This change is problematic, as it matches anywhere in the document, not just as a direct child of the parent element. What is the motivation behind this change? It appears unrelated to other changes in this commit.