Add cache management

Support for Last-Modified and ETag headers in response; those will be
converted to If-Modified-Since and If-None-Match headers for the next
request.