Rewrite migration 085 for performance.

We now make only 3 queries (one of which can be quite slow, but not TOO
slow) followed by O(n) inserts, rather than... what the ORM was doing.
Whatever that might have been.

We also no longer fail to run due to the addition of columns to Blocks,
which was added more recently.