database: refactor database.go to not use globals for server config

The database package used global variables to configure the database. This
does not play well with the new configuration infrastructure.

Change-Id: Ia791ec0b8a5b6f550ee27638dfe361d5f29e00d1
Reviewed-on: https://go-review.googlesource.com/38396
Reviewed-by: Tuo Shan <shantuo@google.com>
3 files changed