First cut at case migration, completely untested
With testing!
Use atomic updates in migration

This protects against a race with a user who is modifying their email,
and also lets us also migrate username and email separately (one might
collide but the other can proceed).
Check usernames/emails both diretly and lowercased

This will gracefully handle old data until the migration script has been
run.
fix initialization problems with script

This is probably not the final factoring of script_init. I'll look again
tomorrow.
Rerrange initialization code a bit

I think this is a reasonable location and name for the thing that calls
loadapp().
Take in config filename on command line

In case you want to run the script on an installation where the config
isn't "local.ini".
Merge pull request #129 from eve-val/case-migration

Case migration