Fix quoting bug in _lp_upwards_find #255

Thanks to @bkc for the pointer to this issue and a partial fix.
Fix quoting in _lp_upwards_find usage

Should fix some issues with VCS detection.
Fix more quoting shit, to fix LP_ENABLE_TITLE
Fix more bad code for LP_ENABLE_TITLE

Fix one more portability hack that was really inefficient.
More warnings about LP_ENABLE_TITLE in the config example
Fix regexp for LP_ENABLE_TITLE

LP_ENABLE_TITLE is now fixed, at least on GNU/Linux with gnome-terminal.
Move $TERM checks out of _lp_title

Move $TERM checks for the TITLE feature (LP_ENABLE_TITLE) from runtime
to init time as the terminal will not change during the shell's life.
Refactor _lp_title

Major refactoring of the TITLE feature to move all $TERM checks to init
time. The _lp_title function is now reduced to two lines.
Refactor _lp_as_text for speed

Uses 'sed' once instead of 2 ; move building of the sed program from
ruuntime to init time.
Merge branch 'refactor/TITLE' into develop

Major refactoring of the TITLE feature, for correctness and speed.
Fix LP_ENABLE_RUNTIME default value for zsh

... and avoid an invalid warning.
Rewrite _lp_upwards_find for speed (#255)
fix promblematic shorten path function

The previous implementation had shell specific paths which did not
produce the same result. It did not respect the maximum length which it
calculated. And for specific cases even repeated part of the path.

This implementation is portable across bash and zsh.
It respects maximum length strictly and only exceeds it when it has to
respect LP_PATH_KEEP leading dirs.
It adds support for only showing the current directory, without leading
ones. This fixes Issue #219.

(Rebased by Olivier Mengué on top of more recent changes in that
fucntion)
Always show complete current dir when shortening path

When LP_PATH_KEEP=0 and current dirname were over maximum length the
name was also shorten. With this fixed _lp_shorten_path should now
always return at least the complete current dirname.
Check if root when striping trailing slash
Remove unneeded local keyword
shorten path: properly escape \ (bash) or % (zsh)
DIRTRIM: fix comment explaining how to enable the feature
Merge branch 'polyphemus/refactor-shorten_path' into develop

Improve _lp_shorten_path for less code and more reliability.
A great contibution by Rolf Morel.
Credit polyphemus