Bugfix: Do not run gcode analyzer when a print is ongoing
Bugfix: Do not run gcode analyzer when a print is ongoing

Evaluate active flag on gcode analyzer AFTER fetching an item from the work queue, otherwise it will always start working once it finds something if the active flag was true once but then switched to false while the queue was still empty.  Thanks to @Salandora for spotting this.

Fixes #357

(manually cherry-picked from 592f3dc)

markwal/OctoPrint,skieast/OctoPrint,javivi001/OctoPrint,mcanes/OctoPrint,Voxel8/OctoPrint,C-o-r-E/OctoPrint,mcanes/OctoPrint,EZ3-India/EZ-Remote,jneves/OctoPrint,Javierma/OctoPrint-TFG,chriskoz/OctoPrint,eddieparker/OctoPrint,SeveQ/OctoPrint,javivi001/OctoPrint,MoonshineSG/OctoPrint,eliasbakken/OctoPrint,ymilord/OctoPrint-MrBeam,eliasbakken/OctoPrint,uuv/OctoPrint,nickverschoor/OctoPrint,Skeen/OctoPrint,senttech/OctoPrint,beeverycreative/BEEweb,shaggythesheep/OctoPrint,skieast/OctoPrint,d42/octoprint-fork,EZ3-India/EZ-Remote,alex1818/OctoPrint,ryanneufeld/OctoPrint,shohei/Octoprint,Skeen/OctoPrint,nicanor-romero/OctoPrint,CapnBry/OctoPrint,shohei/Octoprint,foosel/OctoPrint,eliasbakken/OctoPrint,rurkowce/octoprint-fork,javivi001/OctoPrint,ErikDeBruijn/OctoPrint,foosel/OctoPrint,dragondgold/OctoPrint,Salandora/OctoPrint,aerickson/OctoPrint,markwal/OctoPrint,bicephale/OctoPrint,Salandora/OctoPrint,Jaesin/OctoPrint,nickverschoor/OctoPrint,ryanneufeld/OctoPrint,mayoff/OctoPrint,foosel/OctoPrint,nickverschoor/OctoPrint,mrbeam/OctoPrint,abinashk-inf/AstroBox,CapnBry/OctoPrint,MaxOLydian/OctoPrint,eddieparker/OctoPrint,ErikDeBruijn/OctoPrint,Javierma/OctoPrint-TFG,Skeen/OctoPrint,C-o-r-E/OctoPrint,beeverycreative/BEEweb,Mikk36/OctoPrint,MoonshineSG/OctoPrint,mayoff/OctoPrint,uuv/OctoPrint,abinashk-inf/AstroBox,Mikk36/OctoPrint,JackGavin13/octoprint-test-not-finished,jneves/OctoPrint,CapnBry/OctoPrint,leductan-nguyen/RaionPi,masterhou/OctoPrint,Voxel8/OctoPrint,senttech/OctoPrint,madhuni/AstroBox,SeveQ/OctoPrint,eddieparker/OctoPrint,masterhou/OctoPrint,Jaesin/OctoPrint,bicephale/OctoPrint,shohei/Octoprint,nicanor-romero/OctoPrint,abinashk-inf/AstroBox,leductan-nguyen/RaionPi,dansantee/OctoPrint,chriskoz/OctoPrint,madhuni/AstroBox,Voxel8/OctoPrint,jneves/OctoPrint,C-o-r-E/OctoPrint,JackGavin13/octoprint-test-not-finished,shaggythesheep/OctoPrint,EZ3-India/EZ-Remote,Javierma/OctoPrint-TFG,madhuni/AstroBox,sstocker46/OctoPrint,shaggythesheep/OctoPrint,senttech/OctoPrint,spapadim/OctoPrint,senttech/OctoPrint,AstroPrint/AstroBox,Salandora/OctoPrint,punkkeks/OctoPrint,beeverycreative/BEEweb,Catrodigious/OctoPrint-TAM,AstroPrint/AstroBox,bicephale/OctoPrint,ryanneufeld/OctoPrint,leductan-nguyen/RaionPi,alex1818/OctoPrint,MolarAmbiguity/OctoPrint,ymilord/OctoPrint-MrBeam,abinashk-inf/AstroBox,bicephale/OctoPrint,ErikDeBruijn/OctoPrint,ryanneufeld/OctoPrint,JackGavin13/octoprint-test-not-finished,beeverycreative/BEEweb,mcanes/OctoPrint,MaxOLydian/OctoPrint,chriskoz/OctoPrint,foosel/OctoPrint,Salandora/OctoPrint,alex1818/OctoPrint,dragondgold/OctoPrint,MolarAmbiguity/OctoPrint,uuv/OctoPrint,Mikk36/OctoPrint,leductan-nguyen/RaionPi,ymilord/OctoPrint-MrBeam,punkkeks/OctoPrint,Jaesin/OctoPrint,mrbeam/OctoPrint,shohei/Octoprint,CapnBry/OctoPrint,spapadim/OctoPrint,Catrodigious/OctoPrint-TAM,JackGavin13/octoprint-test-not-finished,mrbeam/OctoPrint,dansantee/OctoPrint,d42/octoprint-fork,aerickson/OctoPrint,dansantee/OctoPrint,MoonshineSG/OctoPrint,ymilord/OctoPrint-MrBeam,spapadim/OctoPrint,MaxOLydian/OctoPrint,madhuni/AstroBox,skieast/OctoPrint,MoonshineSG/OctoPrint,EZ3-India/EZ-Remote,AstroPrint/AstroBox,mayoff/OctoPrint,aerickson/OctoPrint,Javierma/OctoPrint-TFG,shohei/Octoprint,chriskoz/OctoPrint,MolarAmbiguity/OctoPrint,nicanor-romero/OctoPrint,punkkeks/OctoPrint,sstocker46/OctoPrint,Jaesin/OctoPrint,dragondgold/OctoPrint,sstocker46/OctoPrint,SeveQ/OctoPrint,Catrodigious/OctoPrint-TAM,ymilord/OctoPrint-MrBeam,rurkowce/octoprint-fork,nickverschoor/OctoPrint,masterhou/OctoPrint,markwal/OctoPrint