Shut down active write guard on exit

Summary:
Listen for the exit abruptly event, if it's triggered shut down the active write guard.
Depends on D6326

Test Plan: Use `phutil_exit` with an active write_guard, check no exception is thrown.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3469

Differential Revision: https://secure.phabricator.com/D6327