Moves database-server files over from the project-latex repo

Also updates the version of mongoose in the package.json file. We now
specify 3.8.x so that we don't use an unstable version.