Upgrade to new permissions format (Array)

Also added mongoid migrations.

Almost identical to https://github.com/alphagov/migratorator/pull/3