Safely clear shared example groups

Fix a possible nil error if @shared_example_groups has not been
initialized yet.
Merge branch 'safely_clear_shared_example_groups'