misc fixes and browse-kill-ring-replace-yank

Hi, these patches are mostly bugfixes and cleanups, plus one new feature. Please apply :)

The feature in question is to bring a new option called browse-kill-ring-replace-yank, which defaults to t. This option makes browse-kill-ring behave more like yank-pop -- if the last command was a yank, it will replace instead of adding to this yank.

Your thoughts and feedback are heartily requested.

Ethan