title: setInterval doesn't get cleared, function keeps getting executed
body: <p>I have the following function:</p>
  
  <pre><code>function monitorClimate() {
  
      var sensorReadingInterval;
  
      function startClimateMonitoring(interval) {
  
          sensorReadingInterval = setInterval(function() {
  
              io.emit('sensorReading', {
                  temperature: sensor.getTemp() + 'C',
                  humidity: sensor.getHumidity() + '%'
              });
  
          }, interval);
  
          console.log('Climate control started!');
  
      }
  
      function stopClimateMonitoring() {
          clearInterval(sensorReadingInterval);
          console.log('Climate control stopped!');
      }
  
  
      return {
          start: startClimateMonitoring,
          stop: stopClimateMonitoring
      };
  
  }
  </code></pre>
  
  <p>I am watching a button for changes of state like this:</p>
  
  <pre><code>button.watch(function(err, value) {
      led.writeSync(value);
  
      if (value == 1) {
          monitorClimate().start(1000);
      } else {
          monitorClimate().stop();
      }
  
  });
  </code></pre>
  
  <p>The problem is that even after the <code>monitorClimate().stop()</code> call, setInterval keeps getting triggered, thus SocketIO keeps on emitting the sensorReading event. </p>
  
  <p>What am I doing wrong here? </p>