Setup qemu

The QEMU setup script rebased on master. The first commit is what has been reviewed already, the following commits are addressing the review comments and addition for stable commits. The intention is to squash everything before doing the merge.