migration helpers

This adds a bunch of migration helpers for AR, mostly related to
foreign keying.
Merge pull request #2 from redding/kr-migrationhelpers

migration helpers