Add the ability to automatically toggle the direction of a smart quote

Comes complete with a customizable flag, so the behaviour can be disabled.