mini.pairs decides from one character on each side of the cursor, so going
back to wrap existing text (e.g. backticks around a word) always inserted a
stray closer. A new lua/smart_pairs.lua gates the opener keys: a pair is only
inserted when the rest of the line is whitespace or starts with a closing
bracket; quotes also don't pair after a word character or the same quote.
Closers, <BS> and <CR> stay with mini.pairs.
Markdown fences move into the same module and get smarter:
- the 3rd ` or ~ on a blank line opens a fence pair only outside an existing
block and with a blank line, EOF or the enclosing block's closer below
- further characters lengthen both fences (````, `````); <BS> shrinks them
- a length-aware fence stack replaces parity counting, so ``` inside a ````
block (or ~~~) no longer confuses it; nested examples pair, and a pair that
grows long enough to close the enclosing block collapses into its closer