Make class detection more accurate
Make class detection more accurate

It's more correct to use inspect.isclass(X) instead of type(X) == type
as if some parent of the class we're trying to trace has metaclass used,
the type will be that metaclass.

Change-Id: I5102eb46a7a377eca31375a0d64951ba1fdd035d

stackforge/osprofiler,openstack/osprofiler,stackforge/osprofiler,openstack/osprofiler,openstack/osprofiler,stackforge/osprofiler