Use findOne rather than find to reduce complexity

I was previously under the impression that findOne didn't take a
`fields` argument, but on closer inspection it actually does, so this is
a neater way to accomplish the same thing.
Simplify database connection logic

Rather than having a flag indicating whether the database is connected
or not, we simply try to connect once when the application is started,
then immediately throw an error if there was one, this means database
connection issues are caught immediately rather than only when a request
comes in.
Remove unnecessary use of underscore

It's clearer to just use the map function on an array directly, since
it's always there in node.