Add support for finding load time warnings

Extraction of the supporting code from rspec/rspec-core#1654.
Ok maybe I'll find some energy to care about this sometime :)