use proper sed-like syntax for corrections, including regexes, backreferences and a few flags

We support flags `igux`, backreferences `/1` work, and regexes are matched.

This looks very refactored because it was simply ported back from `CloudBotIRC`/`CloudBotRefresh` - in case anyone wanted the plugin.