Use PhutilInvalidStateException
Summary: Use PhutilInvalidStateException. Depends on D12803.
Test Plan: Unit tests pass.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D12829