Added gap buffer code from https://github.com/drj42/gap_buffer.