Cleanup some code in image_cache_task.rs.
auto merge of #3815 : Ms2ger/servo/image-cache-task, r=glennw