Re #8167. Fix a memory leak.

Make sure the resources allocated by the Poco XML parsing are released.
This is achieved by making sure release() is called on the object returned
by getElementsByTagName(). Poco::AutoPtr does this on its destruction.
Merge remote branch 'origin/feature/8167_remotejobmanager_memory_leak'