Add a command db:ping and then use it
Summary: Allow racing the migration / seeding to the database being available.
Test Plan: No plan, really
Reviewers: #hkccp_developers, machniak
Reviewed By: #hkccp_developers, machniak
Subscribers: #hkccp_developers
Differential Revision: https://git.kolab.org/D1285