Extract sandboxing logic into a separate file.

The formatting specs rely on a particular expected
backtrace, which depends on which lines in particular
bits of the sandboxing code are on. Before, changes
to `spec_helper` would require updating the formatting
support expected backtraces. This change will isolate it.
Address ruby warnings from spec files.

For rspec/rspec-support#106.