Put runtime checks in a private function, and don't delete `_api` from namespace.

Merged
NO
1mo ago
+33-22

By putting runtime checks into a private function all the objects and namespaces are automatically cleaned up.

Further, truststore now uses __all__, so it doesn't need to delete the _api namespace, which never stopped a determined user from accessing _api anyway.

This fixes things like import reloading and forcing lazy modules.

Fixes https://github.com/sethmlarson/truststore/issues/264