Purge() + better Resume() + more tests.

To ensure this member function is never called unlocked.