perf(upgrade): speeds up migrating remember me codes

The Remember me cookie implementation has been improved by moving codes
to a separate table. This performs that migration in one query.

Fixes #6204