Optimize calls to get_class($obj) when we know the exact type of $obj.

Summary: Also optimizes get_class(), which is just a non-fataling self::class.

Reviewed By: @elgenie

Differential Revision: D1389240