racket/gui: add [set-]undo-preserves-all-history[?] to editor<%>

This change allows undo configuration of individuals editors to
Emacs-style undo (in addition to the 'GRacket:emacs-undo global
preference that is read on startup).

Also, fix a bug in Emacs-style undo that dates from the port of
the editor into Racket.
fix another potential overflow in fixnum `expt`

This commit is a follow-up to e96d592735. The bug fixed this time is
more subtle, because the overflowing computation is never used, but
that doesn't matter in terms of avoiding undefined behavior.

Thanks for Pascal Cuoq and John Regehr.