Refactor schema

Initial work **DO NOT MERGE** to remove the need to return a Relation object in relational functions.

When the work here is complete relation functions will simply need to return an iterator of tuples.