Use git sha as part of extension directory for git referenced gems.

## Problem

See issue #2947 which this pull request fixes.

## Solution

Monkey patch Gem::Specification#extension_dir so that the source can override the extension directory name if it responds to extension_dir_name, similar to the monkey patch of full_gem_path.