Implementing buffer as a gap buffer

Integration not nearly finished & no tests done. Will be travelling the next few days, please improve.
Yes, the point is to be able to add and remove marks at runtime. The problem with enums (& I may just not understand them correctly, I know they're different from in C) is this: what about use cases where there would be more than one mark of the same enum type (such as multiple cursors, multiple jump points, multiple marks of some generic custom user defined type)? How would a lookup work then? Some data field in the enum? How is that different from making each of them a string?

An enum key seems more idiomatic than a string key if there's a proper way to do this.