Attempted making the RingBuffer thread-safe

Not sure if wait() and notifyAll() are correctly called, but the
BlockingQueue methods are now implemented
Made a small change to a RingBuffer method