Move all checks for the log view commit context to log_select

Track the last line in log_state, so checks for whether to recalculate
the commit context can be moved inside log_select. This ensure that the
correct commit is shown when using jump-to-line and refreshing the log
view.

Fixes #183
Closes #186
remove useless call to strdup() in get_temp_dir()

Since env variables and "/tmp" (literal string) are present for the
execution of the program, there's no need to call strdup().

Also constify the tmp variable.

Closes #182

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Only warn about missing curses configuration once

Reported by Drew Northup.
Remove release-docs/ during distclean

... and remove obsolte SOURCE variable.
tig-1.2
Move documentation to doc directory

Rename AsciiDoc files to have the extension .asciidoc so that GitHub
will display them.
Fix man page install

It was trying to install to `usr/man/man1/doc/tig.1` for example.
Rework README to include the list of online resources

Merges doc/SITES into the README file and moves the installation
instructions to their own file.
Fix submodule-related setup to properly check setenv return value

Commit 7fdd95a switched from using internal putenv-based setenv
work-around to setenv from libiberty. The internal work-around returned
non-zero on success whereas setenv returns zero on success, which means
that tig exits with the following error when started inside a submodule:

	tig: Failed to set GIT_WORK_TREE to ...

Fix calls to setenv to check for non-zero return value and correctly
catch errors.

Fixes #188
Fix path to sysconfdir-based gitconfig in tig(1)

The ending '/etc' is supposed to be part of {sysconfdir}.
Fix HTML doc installation

Similar to Dan Church's fix in b7de063c07b0f4d5879459f84403d14b8a86a011 also
ensure that files are installed using the basename of each file.
Ignore *.swp files and restrict to only ignore top-level config.make
Add work-around for building manpages with Homebrew-based xmlto
Improve the installation instructions

... and add example config.make in contrib/.
Show blob sizes in the tree view

Fixes #163
Ignore generated HTML files in the whole tree
Dynamically allocate commit titles to reduce memory usage

References #160
Postpone ref list lookup to the draw phase

Remove ref_list from the commit struct and look them up when drawing.
This improves the start-up time by ~15% in tests on the Git repository
and also reduces the memory usage a bit.

References #160
Bypass all graph calls and memory allocations when the graph is disabled

This reduces memory usage considerably by no longer allocating graph
data and improves the startup time as well.

References #160
Free graph symbols when reloading the main view

References #160