Update BackgroundWorker to use proper environment and have a queue number.

This fixes a few issues that were being experienced on the background worker. This should fix problems with patients not being imported, and fix the environment being wrong.