Avoided COMP_WORDBREAKS modification

Modifying COMP_WORDBREAKS breaks ssh/scp completions (scp host:<Tab>
shrinks to scp /home/dir/ without the host part for example).  Found a
good answer (http://stackoverflow.com/a/12495480/390044) for this
problem, and simply applied the knowledge here.
Made variables local, cleaned up whitespaces
Merge remote-tracking branch 'netj/comp_wordbreaks-fix'

also add function def _get_comp_words_by_ref and __ltrim_colon_completions in case they don't exist
e.g. __ltrim_colon_completions does not exist on my bash 3.2 (mac)

Conflicts:
	bash_completion.bash