Only add an entry of selection history when a commit is selected

Select another commit will lead two events,
one is dis-select old commit,
the other one is select new commit.

IOW, no need to add entry when the old commit is dis-selected.

This reduces complicate logic in SelectionHistory::Add()

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
Show warning when navigating to a invisible commit

Testing Step:
1. show all branches
2. click some commit in other branches
3. show current working branch
4. navigate selection history

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
Re-write SelectionHistory::Add()

1. Go back to previous one(not current one) when go back the first time
2. Stay at the first selection if GoBack reaching the first one
3. Go back to some commit and click it, then discard the tail of selection history
   * Selection history: A -> B -> C -> D -> E
   * Go back and highlight C
   * Click C
   * D and E will be discard

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
Only discard tail of selection history if a forked entry is added

See example 4

----
Log graphic:

A - B - C ---- E ------ G  <- master(HEAD)
      \       / \
        - D -     - F      <- test

1. When Show log, first item will be G
2. assume the selection history is G F E D C B A
   and current selected one is A

Example 1:
1. Go back first time, highlight B
2. then C D E F G
3. it will stay at first one G if go back again and again

Example 2:
1. Go back to D
2. Click D, selection history is still G F E D C B A
   (current location is at D)
3. Go back once again, highlight E

Example 3: (only step 3 is different with Example 2)
1. Go back to D
2. Click D, selection history is still G F E D C B A
   (current location is at D)
3. Go forward once again, highlight C

Example 4:
1. Go back to D
2. Click D, selection history is still G F E D C B A
   (current location is at D)
3. Click any one but A, e.q. B, then selection history will be changed
   from
    F G E D C B A
           ^^^^^^^
   to
    F G E D B
           ^^^
   (Discard A, B and C. Then add a new selection history entry B)

Example 5:
1. Go back to D
2. Click any one, but D, e.q. E, then exit navigation mode and add a new entry E
=> history: G F E D C B A E
                         ^^^

Example 6:
1. only show current working branch "master", so that F is invisible
2. Go back until highlight E
3. Go back once again, will show a message box which say "xxx is NOT visible"
   (xxx is the sha-1 of commit F)
4. Go back once again, highlight G

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
Highlight with red text color

Also works on DrawTagBranchMessage(),
but I am not sure if it is good!

Also, pass the test on XP OS.

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
Fixed issue #1928: Hotkeys in "Show log" dialog for navigating back / forward

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>