Adding a class wrapper for the spsc_queue.

This removes a bit of code from the private queue which was handling
synchronization previously.