title: Promises not resolving or rejecting
body: <p>I am trying to get the <code>promises</code> to resolve correctly,while debugging the <code>worker</code>,the worker sends the payload using <code>onmessage</code>.</p>
  
  <p>I create a worker using a <code>singleton</code>,the <code>callWorker</code> creates a <code>promise</code> which is resolved in <code>onmessage</code>.</p>
  
  <pre><code> var checkIntersectionWithAllLayers = function checkIntersectionWithAllLayers(rectFeature) {
  
         var callWorker = function callWorker(layerLabel) {
  
               var deferred = Q.defer();
  
              var payload = {
                  type: 'start',
                  payload: {
                      features: layerInfo.getAt(layerLabel).data.toGeoJSON().features,
                      rectFeature: rectFeature,
                      layerLabel: layerLabel
                  }
              };
              worker.onmessage = function getIntersectingFeatures(e) {
  
                  if (e.data.type === 'rectangle_query_worker_result') {
                      var result = e.data.result;
                      console.log("The result for layerLabel", result.layerLabel, "is ", result);
                      deferred.resolve(result);
                  }
              };
              worker.postMessage(payload);
              return deferred.promise;
          };
  
      var promises = _(layerInfo.get())
                        .pluck('layerLabel')
                        .filter(layerData.isLayerChecked)
                        .map(callWorker)
                        .thru(Q.all)
                        .value();
  
      return promises;
  };
  </code></pre>
  
  <p>I use the promises like this:</p>
  
  <pre><code>var resolveIntersections = function resolveIntersections(intersections) {
  
      console.log("The intersections resolved by the code",intersections);
      map.fire("rectangle_query_results", {
          data: intersections
      });
  };
  
  var promises = checkIntersectionWithAllLayers(rectFeature);
  promises
      .then(resolveIntersections)
      .fail(function (error) {
          console.error(error, '\n', error.stack);
      });
  </code></pre>
  
  <p>This code works,I want to get the promise working:</p>
  
  <pre><code>console.log("The result for layerLabel",result.layerLabel,"is ",result);
  </code></pre>
  
  <p>This code is never called:</p>
  
  <pre><code>console.log("The intersections resolved by the code",intersections);
  </code></pre>
  
  <p>The Chrome Devtools <code>Promises</code> tab does not seem to capture the information from this promise.</p>