added a ring buffer module/class `RingBuffer`
changed public/js/chat/ui.js to use `RingBuffer` as `inputHistory` (formerly `sentMessageBuffer`)
changed `Completor` to use `RingBuffer`
fixed a bug in `Completor`, not properly re-setting the cursor position after the last completion