memory: optimize memory_region_sync_dirty_bitmap