[thrift] Error checking for T_OBJECT serialization Summary: Avoid segfaulting via calling zend_fetch_class_entry on something that might not actually be an object; throw an exception instead. Reviewed by: shire