Fix hooks

This pull request is combination of #3006 and #3008 

The `after_cd` and `after_use` should be fixed so there is no reason to have separate merge requests. 

Note: It contains changes in `scripts/rvm` which are different from the changes proposed in #3006.

The summarised behaviour is:

* when rvm is loading first time the `after_cd` hooks should be triggered.
* whenever a user uses the cd command `after_cd` should be triggered
* whenever rvm changes the environment  `after_use` hooks should be triggered.
I read the reason of the introduction 'rvm_project_rvmrc _default=2'
but unfortunately it cause a regression for 'after_use' hooks, I mentioned this in the commit message 3f6289e5465720c8f603b9a7e8073ecb126ac8b3.

Steps to reproduce: 
When rvm is not loaded use `source ~/.rvm/scripts/rvm` and the `after_use` hooks will not be triggered.

I agree that reverting this commit will cause the 'double environment loading problem' but looks it can be fixed differently see the following commit f580d78