Rework styling

The previous approach, storing styling information on a line by line basis,
proved to be less than ideal when manual styling is used. In those cases we
want to preserve existing styling when inserting or deleting text. We now
store style information in a gap buffer of its own.