fix auto and manual require.extensions registration; ref #3141

You can now `require('coffee-script/register')` to manually register,
and the compiler auto-registers when directly running a coffee file.
add CoffeeScript.register method for require.extensions registration
Merge pull request #3279 from michaelficarra/fix-require.extensions-registration

fix require.extensions registration