Improve Program activation/deactivation. Fix issue with sandbox

The glsls-sandbox-cube example was a bit broken because if you
made an error in the GLSL, the example would be broken even afer
you fix the GLSL. It turned out that the Shading code was not
updated correctlt becuase the Program was in a continuous false
active mode. This had two causes which this commit fixes.