Allow smart-quotes-insert-{single,double} to work with electric-pair-mode
Common up the two functions, then make the resulting smart-quotes--insert call insert-char when it is swapping an existing quote, and set last-command-event then call self-insert-command otherwise. In the latter case (inserting a quote), post-self-insert-hook is run, and the quote’s pair can be added by electric-pair-mode.
This fixes issue #6.
I added removal of turn-{on,off}-smart-quotes: minor modes work conveniently without this (in particular, if called from Lisp with no argument, the mode is unconditionally turned on).
Ping? I just found and fixed a minor bug in this PR, namely that it needs to (require 'cl-lib).
Ping again? I'd be happy to take this mode over, as I use it all the time.