refs: replace flags with reference enum type
refs: move ref format string lookup to separate method
refs: make reference formats configurable

This introduces a new `reference-format` setting and changes the default
reference format to make remotes a little easier on the eyes:

	set reference-format = [branch] <tag> {remote} ~replace~

Fixes #201
refs: show list of tags and use numeric sort order by default

Fixes #134
refs: update documentation to reflect branch view renaming
tigrc: revert unintended removal of stage-next

Removed by commit 0723f3b5079dd5def2f2854a54d5573028a24dfa.
view: fix drawing of ID column
search: show number of matches and the current match index
search: replace stage-next action with predefined search prompt command
Add readline support

This patch introduces the readline(3) support to Tig, if it is available
on the system. That is to say, prompt history, cursor navigation and
completion. The currently supported completions are variables (both
"%(name)" syntax and interpolation), actions (e.g. ":edit"), and options
to the "set" and "toggle" actions.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>