sdkman-init.sh: various optimizations and cleanup (#625)
sdkman-init.sh: various optimizations and cleanup (#625)

In my tests, this reduces execution time by about 50% with `bash`,
and 40% with `zsh`. Most of the speedup is from removing calls to
external commands like `basename` and `cat`.
sdkman/sdkman-cli,jbovet/gvm,gvmtool/gvm-cli