Fixed regression for previous work for SHDP-141

On some cases parameters passed via command line were
incorrectly processed.
Adding better support for long running containers SHDP-154

Add similar concepts from appmaster where we have state listener
for container and runner is able to check if container is requesting
wait for complete state.
Work for SHDP-152 and SHDP-153.

Adding better handling for running appmaster services. We can also
now register tracking url if that kind of service is known to
appmaster. Also some housekeeping and more logging.