xen: use same main loop for counting and remapping pages