Add Background thread option to connections

This update allows the user to select if they want to have their connection threads be run as background threads or not. The default is to have the threads run as foreground threads (factory.IsBackground = false) so this does not change the existing behavior expected by current clients.