Cache: fix for sending of empty responses.
Cache: fix for sending of empty responses.

Revert wrong fix for empty responses introduced in 0.8.31 and apply new one,
rewritten to match things done by static module as close as possible.

firebase/nginx,hy0kl/nginx,hy0kl/nginx,firebase/nginx,firebase/nginx,hy0kl/nginx,firebase/nginx