OOIION-1030: use stream_config's stream_def_dict entry (instead of stream_definition_ref)
merge upstream/master
include the agent's current state when reporting diagnostics
- no need to stop the subscriber (to wait for expected child state) because it is registered with the endpoint management API.  - some logging adjustments.
fix typo in log
fix OOIION-1058: also put "shutdown" actions in addCleanup to prevent the process leaks upon failing tests. Although this should cover errors during normal commanding to the root platform and its children after the nework is running, this adjustment may not work when the error happens during the launch itself of the network. It would be rather complicated to add logic to cover this error case.
Merge pull request #1182 from carueda/platform_agent_R2

fix OOIION-1030, 	OOIION-1058