Fix for belong_to_ associations.

Fixes in Postgres and MySQL adapters, plus some new shared code for the two.
Issue: https://github.com/evanmiller/boss_db/issues/27