Read Content type from cached and uploaded file.

Rework Pull Request https://github.com/carrierwaveuploader/carrierwave/pull/1216 into a single commit.