Merge pull request #5 from yaoweibin/junmin-ngx-url-async-fetcher

Junmin ngx url async fetcher
process-shutdown

Merge of Otto's pull request #105:

  This wires up and executes cleanup code.

  There is an issue when sending SIGTERM to a worker under high load, I will
  create a separate issue for that. Normal shutdowns and reloads are working.

Fixes #84.

The issue with workers under high load is #109.
configuration: document content priority workaround
install docs: make more thorough
request context: deal with changes in pagespeed's api

The pagespeed api for handling logs has changed, we need to change with it in
order to build against the latest pagespeed optimization libraries.

Separately, a new test was added to the generic system test that depends on the
property cache (insert_dns_prefetch).  We've not ported the property cache yet,
so this test will fail, and I've added it to the list of failing tests.
Merge pull request #110 from pagespeed/jefftk-request-context

request context: deal with changes in pagespeed's api
options: support mapProxyDomain
cache: fixes

- restores slow worker initialization/termination
- amend an error I apparently made while rebasing to head:
    - do not null the lru cache when using memcached (accidentally
      left in)
    - remove debug fprintf's
    - remove comment about virtual hosts
    - restore a TODO
    - abort when memcached is configure and we fail to connect
      to the memcached interface
Merge pull request #113 from pagespeed/oschaaf-cache-fixup

cache: fixes
rewrite driver factory: start a scheduler thread

Because we're a non-blocking server we need to run a scheduler thread or else
alerts we set might not fire.  We need to be careful to start it after we fork.

Better long term would be to use an nginx timer and avoid the extra thread;
tracking this in #111.

Fixes #55
update docs
base fetch: add Release() and reference counting

When a request is cancelled part way through nginx calls the cleanup
handler. This was set to delete the base fetch, but the proxy fetch was
sometimes not done with it yet.  Both nginx and pagespeed must be finished with
the base fetch before it's safe to delete it.  Pagespeed calls Done(), and this
adds Release() for nginx to call.  Whichever is called second deletes the
base_fetch.  We use a count of references that starts at two and is decremented
atomically with a memory barrier once when Done() is called and once when
Release() is called.

Fixes #103, #104, and #106.
docs: minor edits
readme: keep it up to date with recent code changes, some rephrasing
update project status
Merge pull request #112 from pagespeed/jefftk-map-proxy-domain

options: support MapProxyDomain
headers: set X-Page-Speed properly

We weren't respecting the XHeaderValue configuration option.  If someone sets:

    pagespeed XHeaderValue "ngx_pagespeed";

We should see:

    ...
    Cache-Control: max-age=0, no-cache
    X-Page-Speed: ngx_pagespeed
    ...

Before we were only respecting it for .pagespeed. resources.

Fixes #115
filecache-worker: hook the worker up to the filecache
Merge pull request #117 from pagespeed/oschaaf-filecache-worker

filecache: pass in a slow worker during construction
Merge remote-tracking branch 'google/master' into junmin-ngx-url-async-fetcher

Conflicts:
	src/ngx_rewrite_driver_factory.cc
	src/ngx_rewrite_driver_factory.h