[PATCH v2 15/35] qemu: checkpoint: Move 'virCheckFlags' to top level functions