even if 'name' comes from dir(module), getattr may fail (happened on a probably
generated module in 3rd-party lib, name was '__file__')
all_entity_classes: no more interation through sys.modules, use registry created
by declarative base (private attribute on Entity)