Add missing content type and encoding business logic after MIME-type revamp.

The intial work on the MIME-type revamp addressed most of the content-type/encoding
and accept/accept-encoding work flows, but there were some flows that weren't addressed,
including some corner cases such as dealing with all the flavors of 'text/plain' that
clients can send to Barbican. This commit set also reorganizes some of the business
logic sections to enable better unit testing of this somewhat complicated workflow.

Change-Id: I091f33bfe1515a3faa13024536745d8fed68604a
Merge "Add missing content type and encoding business logic after MIME-type revamp."