Prevent jdk_switcher from resetting PATH

Since /etc/profile.d/load_jdk_switcher.sh always sources
$HOME/.jdk_switcher_rc, jdk_switcher reverting to the original PATH
causes problems when other stuff (such as PostgreSQL service)
starts a login shell after manipulating PATH and subshell is expected
to find stuff in the modified PATH.
Normalize $PATH element by removing trailing slashes
Append : to $PATH in remove_dir_from_path

: at the end is necessary in case the last PATH element has
trailing slashes
Tweak PATH manipulation
Merge pull request #338 from travis-ci/ha-bug-jdk_switcher-path-manipulation

Prevent jdk_switcher from resetting PATH