cache git clone directory

if RUBY_BUILD_CACHE_PATH is set, create and maintain a local bare git
repository in this location.  The name of the git repository is based
on the git URL, so it will be shared between branches.
Address some feedback from Jeremy

* Decrease likelihood of cache collisions
* Avoid file:// urls (and therefore the need to escape)
Extract `sanitize` helper
Default RBENV_VERSION to the globally-specified Ruby

Fixes `rbenv install` in a directory with a .ruby-version file that specifies ree
Pass $RUBY_CONFIGURE_OPTS to REE installer with -c
Build REE --without-tk on Darwin if X11 is missing

Fixes #267