Fix renderer length computation
Fix renderer length computation

Current sum() of once computed _len’s is completely inappropriate in case
removal of the segment caused change in divider lengths: addition or removal of
dividers or change of the divider type when dividers have different length.

Also contains some optimizations: first of all _render_segments is called only
once always, same for strwidth() function for each string. Space is considired
to always have length 1. And do not bother computing any length if no width was
specified.

seanfisk/powerline,blindFS/powerline,areteix/powerline,kenrachynski/powerline,firebitsbr/powerline,Luffin/powerline,areteix/powerline,QuLogic/powerline,bartvm/powerline,xxxhycl2010/powerline,junix/powerline,QuLogic/powerline,prvnkumar/powerline,IvanAli/powerline,s0undt3ch/powerline,cyrixhero/powerline,dragon788/powerline,xfumihiro/powerline,xfumihiro/powerline,magus424/powerline,wfscheper/powerline,Liangjianghao/powerline,DoctorJellyface/powerline,dragon788/powerline,blindFS/powerline,cyrixhero/powerline,lukw00/powerline,S0lll0s/powerline,kenrachynski/powerline,russellb/powerline,wfscheper/powerline,bartvm/powerline,junix/powerline,xxxhycl2010/powerline,prvnkumar/powerline,dragon788/powerline,kenrachynski/powerline,russellb/powerline,lukw00/powerline,DoctorJellyface/powerline,junix/powerline,bezhermoso/powerline,magus424/powerline,wfscheper/powerline,QuLogic/powerline,xfumihiro/powerline,darac/powerline,EricSB/powerline,S0lll0s/powerline,Luffin/powerline,darac/powerline,lukw00/powerline,S0lll0s/powerline,bartvm/powerline,IvanAli/powerline,EricSB/powerline,seanfisk/powerline,seanfisk/powerline,darac/powerline,s0undt3ch/powerline,russellb/powerline,IvanAli/powerline,xxxhycl2010/powerline,bezhermoso/powerline,Luffin/powerline,firebitsbr/powerline,Liangjianghao/powerline,areteix/powerline,magus424/powerline,Liangjianghao/powerline,cyrixhero/powerline,blindFS/powerline,s0undt3ch/powerline,bezhermoso/powerline,prvnkumar/powerline,DoctorJellyface/powerline,firebitsbr/powerline,EricSB/powerline