Speed up `rbenv rehash`

On my system that has 25 versions under rbenv, this speeds up rehash almost 3-fold:

- before: 391 ms
- after:  **134 ms**

This is achieved by removing duplicate names of executables before registering them as shims. Since most Rubies will share a lot of the same executable names ("ruby", "rake", "bundle", ...), this is a considerable reduction in number of shims registered.

@janko-m @bruno- Could you try this revision out and report if there was any speedup?