Patch to fix deadlock in slurmdbd

This patch fixes a deadlock issue with slurmdbd, caused by sharing a
database connection between threads.  According to postgres documentation this
is not allowed, and mysql documentation says it's only allowed if locking
is managed on the connection to prevent concurrent queries.

For our site using postgres, slurmdbd hangs on startup because of
concurrent queries between the rollup thread and the
request_registrations call in the main thread.

This patch gives the rollup thread its own database connection, which is
only opened during the actual rollup work.