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.
My expectations are slightly different:
1. `after_use` to be run always when rvm uses some environment,  even after default ruby is used during rvm start
2. `after_cd` to be run always when user uses the cd command (independently of project file)
3. `after_cd` to be run always/(or never) on rvm start up  

If you think that proper behavior for `after_cd` hook should be like:
 - `after_cd` to be run always on user uses the cd command AND proper project file is in use.

then code [here](https://github.com/wayneeseguin/rvm/blob/c6473a50452e5fff4dc7a618ced58f1111c5516b/scripts/cd#L30) should be 'reverted' to something like [this](https://github.com/wayneeseguin/rvm/blob/5049a2907ad6b1fc5bc8fc3cf132faf2e34e4560/scripts/cd#L33) 

Anyway the described expectations is my personal preference feel free to ignore them.