implemented gap_buffer_join so backspace to delete a newline will work
fix memory bug