Pathbar single step scroling fix

This fixes some issues with pathbar scrolling and adds some documentation and a bit refactoring for hopefully better understandable code. 

Unpatched: 
* Pathbar scrolling in sub-folder direction always jumps to leftmost button 
* Pathbar scrolling in parent direction can skip folders because bug in space calculation.