OOIION-741 remove hardcoded timeout for agent spawning

Instead of waiting a hard-coded 20 seconds for the agent to spawn, wait an amount of time bounded by the timeout of the service call.  The maximum allowed spawn time will be at least one second less than the time allowed to complete the service call, to ensure that the service call completes even if the agent fails to launch promptly.