Join work, also explicit relation section

Thought a lot about how to do relations in the future, eventually
decided to specify them in a relation block. Right now, this will just
detect them and add them to the schema correctly. Soon, I'll add
auto-scopes function on the individual structs and helper functions for
quickly getting related structs. Next few commits will the interface
purge, so after that we'll get the struct functions.