accept code ref for content_type attribute

This would let users determine caching behavior based on more than just `Content-Type`. I am interested in looking at the `PATH_INFO`, but passing `$env` to a code ref seems like the most flexible solution.

Perhaps this should be named something else besides `content_type`, but it seemed simplest to use the existing option.