Add support for finding load time warnings

Extraction of the supporting code from rspec/rspec-core#1654.
See 3f9000e838782cfc043702fd6031dea623d8968e -- I found an alternate solution.