This is a continuation of D4103. It includes
- the D4103 fix, by handling busy pages for both _WAIT and _NOWAIT in the same way (modulo sleep),
- the fix to not free the shadow swap when parent page is invalid,
- combine all three instances of the sleep code into one helper.
It was coded with assumption that invalid implies busy, which is checked by a new assert. This can be replaced by explicit invalid check and skip, if decided.