migration helpers

This adds a bunch of migration helpers for AR, mostly related to
foreign keying.

@jcredding ready for review.  so coverage holes but I see little value in covering them - AR does most of it.  any problems with this?