Detect all accounts.

Some accounts are people, for legacy reasons. Make sure we detect them.
Required for uprades to work properly, in particularly we need to be
able to tell if the account is locked or not.

Change-Id: I7e806838839174155d383ee2d40933db0354ae81
Add migration to initialize counters.

This change was omitted from b9b479935df46496140f45c017f5b5f874ddf525.

Change-Id: I1448235d736cc557210b590ff8e9e5f5d725f36c