Add proper support for database service discovery
For database service discovery to work, we need to start the service after forking as otherwise the background thread only runs in the master worker.
See https://docs.gitlab.com/ee/administration/database_load_balancing.html#forking for more information.
Related issue: https://gitlab.com/gitlab-com/infrastructure/issues/4366