Improve sort order in history viewer
When all versions are displayed, the sort order became fuzzy
since HEAD could appear anywhere depending on whether it introduced
changes or not.
This makes it appear as high as possible regardless of whether it introduces
changes or not.It may low if the HEAD commit is on another branch with newer
commits.
Workspace and index. when present, will always be fiirst. Index is compared only to workspace and HEAD,
while workspace is compared to all HEAD:s.
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>