More fixes for `CustomForeignKey`

It looks like some new flags were added that allow the related field to avoid constraints and reverse relationship generation. Taking advantage of those to make migrations work.

Addresses additional issues mentioned in #126

@KevinGrahamFoster, I would very much appreciate knowing if these changes get migrations working for you again.