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 aafd758410015e08b1aa8964d739ba8587ce58dc from qemu
While there, tighten error_append_hint()'s assertion. Backports commit f4d0064afcff4c38b379800674938cde8f069dcd from qemu