Accept headers + ToResponseCode

This is several bug fixes, and needs breaking changes to rest-types, rest-core, and rest-gen. I need to test this more thoroughly and clean it up before releasing it. Hopefully also write some automated regression tests.

The most important fixes are for these issues:
* The deserialization for `DomainReason` is partial (always contains an `error` instead of the response code function)
* Accept headers and conversion functions based on the available output/error types are not correctly set for errors in generated clients (both Haskell and JS) and leads to runtime errors