hg: improve untracked files detection (speed)
hg: refactor outgoing commits counting

Rename variable 'has_commit' to 'commits' and declare it as integer.
hg: improve speed of check for uncommitted stuff
hg: minor code layout
hg: remove usage of tail+awk in favor of sed
Merge branch 'refactor/hg-cleanup' into develop

Cleanup _lp_hg_branch_color implementation for improved speed.