apiserver: Use request WaitGroup for /log & /logsink
apiserver: Use request WaitGroup for /log & /logsink

The code to increment and decrement the apiserver's request WaitGroup,
and prevent requests from starting when the apiserver is shutting
down, has been extracted from apiHandler and is now also used with the
/log and /logsink API handlers. This prevents "Session already closed"
panics when requests to these handlers have just started as the
apiserver is shutting down.

AdamIsrael/juju,bogdanteleaga/juju,anastasiamac/juju,axw/juju,davecheney/juju,ericsnowcurrently/juju,kat-co/juju,marcmolla/juju,alesstimec/juju,mjs/juju,davecheney/juju,bz2/juju,macgreagoir/juju,reedobrien/juju,marcmolla/juju,howbazaar/juju,bz2/juju,mikemccracken/juju,bogdanteleaga/juju,ericsnowcurrently/juju,frankban/juju,marcmolla/juju,mikemccracken/juju,axw/juju,makyo/juju,axw/juju,perrito666/juju,reedobrien/juju,bogdanteleaga/juju,marcmolla/juju,mjs/juju,AdamIsrael/juju,davecheney/juju,howbazaar/juju,gabriel-samfira/juju,frankban/juju,kat-co/juju,bogdanteleaga/juju,perrito666/juju,kat-co/juju,anastasiamac/juju,frankban/juju,macgreagoir/juju,anastasiamac/juju,anastasiamac/juju,davecheney/juju,bz2/juju,macgreagoir/juju,bac/juju,mjs/juju,reedobrien/juju,mikemccracken/juju,gabriel-samfira/juju,ericsnowcurrently/juju,alesstimec/juju,macgreagoir/juju,mjs/juju,dimitern/juju,bac/juju,bac/juju,makyo/juju,dooferlad/juju,alesstimec/juju,axw/juju,waigani/juju,dooferlad/juju,perrito666/juju,waigani/juju,mjs/juju,ericsnowcurrently/juju,gabriel-samfira/juju,ericsnowcurrently/juju,howbazaar/juju,waigani/juju,kat-co/juju,bac/juju,dooferlad/juju,reedobrien/juju,bac/juju,bz2/juju,frankban/juju,dooferlad/juju,dimitern/juju,howbazaar/juju,AdamIsrael/juju,perrito666/juju,kat-co/juju,axw/juju,frankban/juju,makyo/juju,dooferlad/juju,howbazaar/juju,alesstimec/juju,mikemccracken/juju,gabriel-samfira/juju,makyo/juju,anastasiamac/juju,waigani/juju,marcmolla/juju,mjs/juju,dimitern/juju,dimitern/juju,dimitern/juju,bz2/juju,mjs/juju,perrito666/juju,gabriel-samfira/juju,mikemccracken/juju,macgreagoir/juju,alesstimec/juju,AdamIsrael/juju,reedobrien/juju