Completely rewrite completion context analysis master
The idea is to scan the token stream, pushing and popping delimiters. The complicated aspects arise from the syntax: - In order to correctly classify links like [foo](bar), we need to remember the previously closed group. - Idents like \route-asset, \subtree, \date, \transclude have their own completion behavior and need to be recognized. Context analysis returns a list (or stack) of so-called frames. For example: "\p{#{" -> [{delim = Math_inline; purpose = Math}; {delim = Brace; purpose = Body}] The purpose is for disambiguating, for example, the cases \asset{ and \transclude{. They both use the same delimiter, but their completion behavior is different. The completion handler can use this information to easily tell which completions should be provided and, more importantly, this is extensible by adding more rules. For now the rules just check the top frame, meaning the most recently opened delimiter. I will need to use this in practice to see if this is the most convenient behavior.