Correct stub undefined parent modules all the way down when stubbing a nested
constant.

This is necessary for verifying doubles to work correctly, since they
need to distinguish between real and stubbed constants.

Fixes #529.
Merge pull request #541 from rspec/issue-529

Correct stub undefined parent modules all the way down when stubbing a nested constant.