dbUpdate: Don't migrate accounts with no jobs

The old setup allowed public creation of accounts. As such
there can be a lot of accounts that aren't intended to be
'projects'.

This uses the same condition we used to have in ProjectsAction
to show only "project"-like accounts.
TestSwarmContext: Fix undefined 'gitHead' in calculateVersionInfo

If the git repo is in a detached state, the 'else' clause is
used where $gitHead doesn't exist yet. Should reference
$gitHeadFileCnt instead.