Default to previous search expression for :%s.

In vim, :%s//<replace exp>/ should replace the previous search
expression (that we already store to use with "n").

Also cleans up some of the code here.

Fixes #676.