Add a static assertion that a classes's smart_ptr is compatible
Use typeid name for interface wrappers too.  (Also introduce more uses of makeLegalFunctionName)