Separate extensions for shared and static ruby

Ruby built with ENABLE_SHARED cannot share extensions with ruby built
without this option, you get an immediate segmentation fault on load.

Now the extension directories are separate per ruby API version.
Static ruby now has a "-static" appended.

This addresses one of the TODOs in @3a924d3, see also #596