Re-write of priority for accept vs. content type.

Catalyst Rest plugin has a known bug concerning the behaviour of Accept
vs. Content-Type
(https://rt.cpan.org/Public/Bug/Display.html?id=46974). It is not
possible to specify a request content-type of say application/json and
set an accept header of text/plain. The plugin will force the output to
be JSON.

This rewrite when we work with POSTs will prioritise the Accept header
over Content-Type. The rewrite does not affect the current behaviour for
GET requests.
Merge branch 'feature/accepts_trait'

Suggested patch works, but has no impact on our JSON-only POST endpoints. application/json still always wins because it is the only one supported as an output format, and the content-type of the message is also considered for a return format.