Create base association, commonize `BelongsTo` and `HasMany` logic

This commonizes the `BelongsTo` and `HasMany` logic into a base
association. This removes a lot of duplicated code and sets up for
adding future associations (`HasOne`). This also greatly cleans up
the specific associations and highlights what they are actually
about.