Prevent replacement of {\d+} sequences in chat.format and remove stray '

This fixes issues presented by khobbits with the latest chat.format brace fix.

https://github.com/phrstbrn/Essentials/commit/8fde5102b9161cda2267d3638c15dc6fda48a7fd#commitcomment-2494321

Unfortunately the regex to fix it is gross (and largely unreadable), however, it does fix the issue and a few other edge cases.