(#22891) Use the most preferred supported format

Previously the code had assumed that the order of the supported formats 
didn't mean anything. However, the preferred_serialization_format, and other
factors, meant that the order really does matter. This makes the selected
format, when the Accept header is */* be the most preferred, supported
format.