bash/PROMPT_DIRTRIM: complete rewrite
bash/PROMPT_DIRTRIM: complete rewrite

Complete rewrite of the _lp_get_dirtrim into _lp_set_dirtrim with a much
faster implementation that avoids char by char processing of $PWD.
Also use (( )) builtin.

tocomo/liquidprompt,dtschan/liquidprompt,timhyson/liquidprompt,enrdstrm/liquidprompt,joshuarubin/dotfiles,tsbarnes/liquidprompt,joshuarubin/dotfiles,lyoshenka/liquidprompt,colinlieberman/liquidprompt,joshuarubin/dotfiles,jonathanjsimon/liquidprompt,illwieckz/liquidprompt,BobHood/liquidprompt,nojhan/liquidprompt,dan-cleinmark/liquidprompt,milouse/liquidprompt,kenrachynski/liquidprompt,mathieumd/liquidprompt,elementalvoid/liquidprompt,smadhueagle/liquidprompt,tstone2077/liquidprompt,tkuminecz/liquidprompt,pkkolos/liquidprompt,alexprengere/liquidprompt,joshuarubin/dotfiles,jaesivsm/liquidprompt,laurentbardin/liquidprompt,dpilone/liquidprompt