Fix: consider base classes while determining table names (straight)

Replaced the reduce call with an explicit for loop over the base
classes.

Example use case: Standard mixin which defines the table names

```python
class StandardMixin(object):
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
```