static-handler: refactor to use write_handler_response

This fixes sending out the weak ETag for ngx_pagespeed_static/js_defer.hash.js,
and simplifies things somewhat for this code path.
It also adds a test for it.

This also adds expected failures for:
  "Check for case where rewritten cache should get purged."
  "Check for case where rewritten cache should not get purged."
  "Check for case where there is a rewritten cache hit."

Fixes https://github.com/pagespeed/ngx_pagespeed/issues/434