Added two new queue types: priority with and without duplicates.
Fixed various issues with duplicates and synchronization in queues.