ooiion-1356 Clear out agent_config in agent_instance of device extended ...

...resource. Add check that agent instance resoiurce is available.

@jamie_cyber1  please review