SERVER-24933, we should ensure that our shutdown lands between apply batches.
There are a few ways to get there:
- Ignore shutdown interruptions during apply batch (not good for long running applies like index builds)
- Have shutdown wait for the current apply batch (similar to above)
- Undo/reset current batch work on shutdown to be in a consistent state
In addition we should move setting the minvalid boundaries under the PBWM lock so that minvalid reflects the completed apply batch.