migration-scripts: fix hedgedoc id issue
Depending on the order of profiles in the database, the script produced this error: mariadb.IntegrityError: Duplicate entry ... for key 'profileid'
Fixed this by prioritising the entry with profile id matching kratos id