`nvm_do_install` decided whether the profile already loads nvm, and its bash completion,
by grepping for `/nvm.sh` and `$NVM_DIR/bash_completion` anywhere in it,
so a commented-out line, the usual way to disable nvm, counted as present,
and reinstalling left the shell with no nvm.
Only count a line whose first non-blank character isn't `#`.
Fixes#1889.
Signed-off-by: Vaibhav Cheruvu <vaibhavsharma.c@gmail.com>
Co-authored-by: Vaibhav Cheruvu <vaibhavsharma.c@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>