Various updates and fixes for the migrate script and log processing.

Fix the geo field so it stores properly.
Allow a better fallback for useragent parsing.
Use the bulk indexing API so the migration script doesn't eat resources.