cpu: Add qemu_for_each_cpu()

Wrapper to avoid open-coded loops and to make CPUState iteration
independent of CPUArchState.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
