Revise images controller for compatibility with current Dragonfly.

This code was trying to rescue
Dragonfly::FunctionManager::UnableToHandle, which has been removed from
the current version of Dragonfly.
Merge pull request #2622 from kaben/prometheus

Revise images controller for better compatibility with current Dragonfly.
Merge remote-tracking branch 'upstream/master'