Allow `PhutilTypeSpec` to work with classes and subclasses.

Summary: Fixes T4286.

Test Plan: `arc unit -- src/parser/`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4286

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