Determines the best encoding type to use based on the $supported
types the application says it supports, and the types requested
by the client.

If no match is found, the first, highest-ranking client requested
type is returned.

@param array $supported

@return string