Dry up options and headers logic, allow headers to be passed to OPTIONS requests

- fixes quite a few edge cases surrounding middleware not being run
Merge pull request #498 from karlfreeman/fix-options-headers

Fix options headers