Fix syntax warning

This isn't Seattle.rb, @senny. ;)
Refactor a common class to reduce the duplication for `references`

The code for `TableDefinition#references` and
`SchemaStatements#add_reference` were almost identical both
structurally, and in terms of domain knowledge. This removes that
duplication into a common class, using the `Table` API as the expected
interface of its collaborator.