[PATCH 06/12] qemuAgentGetHostname: Refactor to remove cleanup section