fix rehash when paths have spaces in them

fixes #450
add fish shell support
cleanup in fish

Use process subtitution syntax:

    . (rbenv init -|psub)

instead of:

    eval (rbenv init -)

because the latter doesn't work well with newlines.
fix `rbenv()` function in ksh and dash

ksh syntax becomes:

    function rbenv {
      typeset command

`typeset` only declares a local variable if there's an explicit
`function` declaration; otherwise the variable leaks.

Other shells use this syntax:

    rbenv() {
      local command

This is for dash compatibility, which supports neither `function` nor
`typeset`.

references #205, fixes #408
Merge branch 'shell-fixes'
Merge remote-tracking branch 'upstream/master'