Mocked requests do not contain default headers normally set by LWP::UserAgent

Hi,

I've been using your module quite a bit when testing code built around LWP::UserAgent. I usually test using the ->map($site, $coderef) method, and in the $coderef I test against the HTTP::Request object that is passed into it, to make sure that it has everything I expect it to.

Today I noticed that authorization headers were missing from the HTTP::Request objects that were being created when doing $lwp->get() when using Test::Mock::LWP::Dispatch.

It took a little digging into LWP::UserAgent, but I realized that 'default' headers are added to requests by prepare_request(), which is called by send_request() in LWP::UserAgent.

Since your module mocks simple_request, send_request() is never called, so prepare_request() is also never called.

The test case I've included better illustrates what I'm talking about. It fails against master currently.

I didn't want to break backwards compatibility by making drastic changes, so this pull request just adds a switch that calls prepare_request() against any HTTP::Request objects passed into your module's simple_request function. So when this switch is set to 1 in a test case, it fixes the issues I was running into.

Your full test suite still passes if we always used prepare_request() and didn't rely on the switch, so it's up to you whether running prepare_request() should be the default or not.

Let me know if you have any about the change, or suggestions on how it can be improved upon so that it can be merged.

Joe Papperello