Clean up PHPException related code.

A related diff in PyPy. Moves PHPException to the app-level.