Add an optional target queue to for database operations
The optional target queue is useful for synchronising other work with respect to database operations. Provided the target queue is also a serial queue, work submitted to the private connection queue and work submitted directly to the target queue will still be executed in serial.
The queue context is now set on the target queue if present. The connection queue inherits values set on the target queue, so the call to DispatchQueue.getSpecific, using queueKey, returns queueContext as expected. For this logic to still be thread-safe, the target queue must be a serial queue. queueKey is now an instance variable so that every connection gets a unique key, ensuring that connections can't write over one another's context variables.
The attributes: parameter is also removed from the call to initialise the database queue, as [] (i.e., serial) is already the default.
Perhaps related to #937