Small fixes for torchbind (#28800)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28800
Fix up namespaces and make friendly error message when registered class doesn't inherit from the right base
Test Plan: Imported from OSS
Differential Revision: D18175067
Pulled By: jamesr66a
fbshipit-source-id: 5c7cf3a49fb45db502d84eb3f9a69be126ee59fb