Refactored migrations to blocking API.
Updated to new version of PeerDB.

To support new migrations.