fixing nilclass error when clearing shared example groups

Problem occurred for me running guard-jruby-rspec on windows.
add spec to ensure saftey, but this wont work.. Also changelog
update docstring and simulate spec circumstances
Revert "update docstring and simulate spec circumstances"

This reverts commit e7d78564027a83b1442e94583815640cf2502048.
Change SharedExampleGroup::Registry from a singleton module to a class.

This makes it far easier to test it in isolation without need
for any gymnastics.
reword changelog
Merge pull request #1015 from rspec/safely_clear_shared_example_groups

Safely clear shared example groups, rebased, speced and changelogged.