cmd/jujud/agent: fix mockMetricAPI
cmd/jujud/agent: fix mockMetricAPI

Two issues fixed:

1. mockMetricAPI was being patched in before CleanupSuite.SetUpTest
was called so the patch cleanup was being lost and the patch never
undone.

2. mockMetricAPI was starting goroutines that were never being
stopped.

mhilton/juju,tasdomas/juju,dimitern/juju,alesstimec/juju,marcmolla/juju,alesstimec/juju,frankban/juju-tmp,makyo/juju,fwereade/juju,AdamIsrael/juju,axw/juju,thomnico/juju,ericsnowcurrently/juju,frankban/juju,sinzui/juju,voidspace/juju,thomnico/juju,frankban/juju,davecheney/juju,cherylj/juju,frankban/juju,gabriel-samfira/juju,gabriel-samfira/juju,marcmolla/juju,mjs/juju,davecheney/juju,dimitern/juju,makyo/juju,bogdanteleaga/juju,alesstimec/juju,wwitzel3/juju,mhilton/juju-juju,sinzui/juju,makyo/juju,tasdomas/juju,anastasiamac/juju,waigani/juju,howbazaar/juju,mjs/juju,axw/juju,kat-co/juju,mhilton/juju,mikemccracken/juju,howbazaar/juju,bz2/juju,davecheney/juju,frankban/juju-tmp,mhilton/juju,tasdomas/juju,fwereade/juju,axw/juju,davecheney/juju,mjs/juju,tych0/juju,dimitern/juju,tsakas/juju,mikemccracken/juju,mjs/juju,ericsnowcurrently/juju,tych0/juju,anastasiamac/juju,howbazaar/juju,perrito666/juju,dimitern/juju,mjs/juju,bz2/juju,ericsnowcurrently/juju,bac/juju,mhilton/juju-juju,bac/juju,wwitzel3/juju,mhilton/juju,voidspace/juju,gabriel-samfira/juju,wwitzel3/juju,kat-co/juju,mikemccracken/juju,bac/juju,thomnico/juju,mjs/juju,axw/juju,marcmolla/juju,howbazaar/juju,dooferlad/juju,dimitern/juju,cherylj/juju,tych0/juju,gabriel-samfira/juju,mikemccracken/juju,reedobrien/juju,reedobrien/juju,perrito666/juju,perrito666/juju,kat-co/juju,bz2/juju,macgreagoir/juju,frankban/juju,anastasiamac/juju,dooferlad/juju,Altoros/juju-cloudsigma,axw/juju,marcmolla/juju,thomnico/juju,voidspace/juju,cherylj/juju,waigani/juju,dooferlad/juju,cloud-green/juju,mikemccracken/juju,ericsnowcurrently/juju,cloud-green/juju,anastasiamac/juju,cherylj/juju,dooferlad/juju,anastasiamac/juju,bz2/juju,tsakas/juju,AdamIsrael/juju,fwereade/juju,bac/juju,frankban/juju-tmp,reedobrien/juju,frankban/juju-tmp,howbazaar/juju,waigani/juju,reedobrien/juju,AdamIsrael/juju,cloud-green/juju,marcmolla/juju,macgreagoir/juju,reedobrien/juju,cloud-green/juju,tsakas/juju,ericsnowcurrently/juju,voidspace/juju,alesstimec/juju,macgreagoir/juju,sinzui/juju,bogdanteleaga/juju,frankban/juju,bac/juju,perrito666/juju,sinzui/juju,bz2/juju,tsakas/juju,mhilton/juju-juju,fwereade/juju,macgreagoir/juju,waigani/juju,Altoros/juju-cloudsigma,kat-co/juju,AdamIsrael/juju,Altoros/juju-cloudsigma,dooferlad/juju,gabriel-samfira/juju,macgreagoir/juju,perrito666/juju,Altoros/juju-cloudsigma,kat-co/juju,alesstimec/juju,mjs/juju,bogdanteleaga/juju,makyo/juju,bogdanteleaga/juju,tych0/juju,mhilton/juju-juju,wwitzel3/juju,tasdomas/juju