branch: allow multibyte chars in shortening algorithm
branch: allow multibyte chars in shortening algorithm

previously, the branch extension used name[0:6], however that would
break with multibyte characters, since this is a byte index and not a
character index.

fixes #1686

yzhou61/vim-airline,rchicoli/vim-airline,chrisbra/vim-airline,bling/vim-airline