Fix regression making the status view inaccessible for new repositories

Commit a11bf779be32ba139e9c0839c50d12475581058c (Load HEAD ID and
symbolic name as part of the repo info) introduced the regression by
passing "HEAD" to git-rev-parse. In new repositories, HEAD does not
resolve to anything and thus caused an error message and no additional
output.

Work-around this issue by moving all reference arguments to the end of
the command.
Move encoding utilities to the io module
Move get_temp_dir to io module
Move error messages to new util module
Move warn and die to the util module
Free all cached list of reference when reloading the references

This fixes a bug where stale reference lists where used after a new
branch was created via the branch view.

Fixes #196
Create a commit view history API based on the tree view stack
Implement navigating back to previous view state in the blame view

Use the new view history API to track the previous blamed revisions when
navigating to the blame information for the current file. Data for the
current blame view is stored inside the view state and pushed onto the
stack when reloading another blamed revision from inside the blame view.

This also improves error messages when trying to reloading the blamed
revision currently displayed as well as navigating back in views that
does not support it.

Note, that the back action (REQ_BACK) acts similar to REQ_PARENT in the
tree view.

Fixes #124
Fixes #139
Fix handling of combining characters in utf8_length() when reserve==TRUE.

Commit 550e3283 did not change utf8_length() to handle the new return
value it introduced in unicode_width().
This patch is based on a similar patch I proposed earlier.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix blame_go_back to copy the whole file path
Introduce a path cache and use it for the blame view

This reduces the file path limit of 128 characters, which is not enough
for Java enterprise projects.
Add common utility for parsing chunk headers
Add support for splitting chunks in the stage view

Fixes #107
Handle diffs with no newline at end of file

Also simplify the finalization logic.
Make blame_draw check if the filename is NULL instead of empty

Fix null pointer exception^W^W^Wsegfault.
Fix regression making diff parsing fail when opening the blame view
Fix regression in diff_get_lineno
Fix regression in add_line_at making line numbers start atf 0 instead of 1

This in turn caused the stash view to segfault when displaying IDs.
Merge the content of BUGS into the README file
Use .adoc as the extension for AsciiDoc files in doc/