Replace SQL with sqlalchemy.Table

This kills the old SQL object and redirects various magic functions to work with `sqlalchemy.Table` objects instead.

This is part of a push, along with #867 to remove custom objects in favor of community standard ones.