Fix usage of $_LP_SHELL_bash
keeping liquidprompt from overriding PROMPT_DIRTRIM when path shortening is disabled
Reset LP_OLD_PWD on startup

Reset the LP_OLD_PWD variable on startup.
This makes debugging easier: previously we had to change directory
after a reload to see the changes of the new code for the PWD-cached
parts.
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.
_lp_shorten_path: set value for locals on separate line (zsh)

zsh doesn't like if we set the value of a local while we declare it.
_lp_shorten_path: don't use a sub shell anymore

Instead of using a subshell, _lp_shorten_path now directly sets its
result into the LP_PWD variable.
This is not just for style, but for speed.
Compute lines of *unstaged* changes in prompt

Parse `git diff --shortstat` to get the line count of *unstaged* changes.

Improvements of the git related stuff are still possible, using more
plumbing commands, like:
* `git diff-index --quiet HEAD` to check for uncommitted changes (branch
  color), rather than relying on the `git diff --shortstat HEAD`
* `git ls-files --exclude-standard --others` to check for untracked
  files
Use proper quoting when handling PROMPT_COMMAND

May fix issue #250.
Add LP_PATH_DEFAULT to allow to customize how $PWD is shown

See feature request #219.
Cleanup previous commit about LP_PATH_DEFAULT

- avoid overriding the existing LP_PATH_DEFAULT from the environment
- use the _LP_*_SYMBOL convention for shell dependent default values
_lp_source_config: fix quoting for LP_MARK_ variables
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.