[install script] Refactors NVM_SOURCE

Deduplication of the code that was defining the source to install NVM from.
please stick with the all-caps "NVM_" prefix for local function vars when possible, to cover `ksh`.