Rename buffer functions to resemble javascript

Array methods.
Add more buffer tests
Refactor buffer module to use a 'gap buffer' as

the backing data structure