[keyserver] Extract DB version functions to separate file
Summary:
In the following diff, I'm going to need to call these from setup-db.js. Without this diff, that change would result in a require cycle.
Depends on D4152
Test Plan: This is a simple refactor. I tested it in combination with stack (see test plan in D4151), and also used Flow
Reviewers: palys-swm, atul
Reviewed By: palys-swm, atul
Subscribers: Adrian, atul, yayabosh
Differential Revision: https://phabricator.ashoat.com/D4153