Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Backports commit d38ea87ac54af64ef611de434d07c12dc0399216 from qemu
* revert to use of g_free to make future qemu integrations easier * bracing