(refactor) Move static file handler into dedicated module

I'm about to add another handler for 304 caching and I think having them
all in the same file will become inconvenient.
(refactor) Move path building code into new util module

The same logic will be required by the cache handler.
(refactor) Move error types into util module

There they can be used by the caching handler I'm about to add.
(feat) Add StaticWithCache handler

This handler wraps Static and adds 304 caching. It currently won't
handle requests for directories correctly.
(refactor) Move index serving logic into util

Moved the logic that decides whether index.html should be served into
util. It is going to be used by StaticWithCache later, so it needs to be
in a commonly accessible location.
(refactor) Move directory redirect logic into util
(refactor) Move index path creation into util