Add a mechanism to sync user data with dev app.

It strips all sensitive data from the set, and syncs in a cron
job which runs every hour.
Make sync requests use json instead of form.

I also finally fixed the whole dev mode detection mess.