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