Make extconf.rb (a little) easier to understand

Our extconf.rb is pretty unreadable.  This is a first draft of taking each logical section and extracting into a method to organize.  It does, I think, point to future re-working, but I didn't want to confuse that with the general re-structuring.

I also had to make a change in it for it to be 1.8-compatible.

the test suite still segfaults.. something about minitest/testunit. I'm not sure.