Unbreak C-x behavior at end of document.

There was a bug where it would try to delete beyond the end of the
file, which obviously didn't work. So now I take care to not exceed
point-max when trying to delete the last line of a file.
Begin de-twingling my GEdit emulation from my personal settings.

Obviously my personal preferences are highly subjective, and pretty
much nobody is going to want to use my whole .emacs as-is. But I feel
that emulating GEdit inside of Emacs has some value for the community
(along a similar tradition as Viper mode, perhaps), so I need to
extract the GEdit stuff into a self-contained minor mode to make it
easier for people to play with.

This particular commit is basically just a bunch of minor-mode
boilerplate, and only defines three shortcuts: C-q, C-w, and C-s.
However it lays the groundwork for a gedit minor mode that is much
easier to package and distribute.
Extract a bunch more GEdit stuff into the new minor mode.
Enable MELPA and get shell-pop and sr-speedbar from there instead.