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.