Even more build fixes

The standard routine: You merge a pull request, I send a fresh one...

This one consists of some more small fixes, some more refactoring and a real goodie: Fixing the spurious qemu rebuild problems, where each new run of "make" would rerun qemu configure and rebuild some qemu files w/o need.