Refactor allow_all_content_types for readability

The current implementation of the decorator allow_all_content_types was
slightly confusing, since while iterating through the mimetypes it would
call setdefault each time for the same object. So I separated that call
from the iteration that sets the default values to make it clear. Also,
the iteration was turned into a generator for a more pythonic approach
and performance.

Change-Id: I2e57cb38a4e1bca21af6272a2f4d72b7ef032845
Merge "Refactor allow_all_content_types for readability"