grep: extend functionality, add man page entry, add unit test.
walkchangerevs now returns a two-tuple. Its behaviour is also
extensively commented.
The annotate command's getname function has been factored out to a new
function, trimname, so it can be shared between annotate and grep.
The behaviour of grep has been beefed up, so that it now performs a
number of useful functions.
abort: repository a/.hg not found!
255
requesting all changes
abort: error: Connection refused
255
abort: repository a/.hg not found!
255
abort: destination '../a' already exists
1
abort: repository a/.hg not found!
255
abort: destination 'q' already exists