Update API migration to not use lock.

Use CompareAndSwap instead, it's cleaner.
Update data migrator to sort directory names

Forces order of shard migrations.
Also remove old commented code.