title: onResourceReceived logs every resource twice?
body: <p>I'm trying to use phantomjs to get some metrics about the likelihood of a race condition affecting a page, I have 2 script files, some functionality hosted on my site is dependant on some globals set by a file coming from a third party.</p>
  
  <p>I thought that using onResourceReceived in phantomjs I could log when each file loads and then run that test a bunch of times to get an idea of how often this race condition will cause issues, an example of my code is below (it's not the actual code and I'm not affiliated with the BBC):</p>
  
  <pre><code>(function (p, wp) {
    "use strict";
    var page, start,
      count = 0, max = 10,
      webpage = require('webpage'),
      url = "http://www.bbc.co.uk";
  
    function process() {
      if (max == count) {
        console.log('done processing!');
        p.exit();
      } else {
        count++;
        start = new Date();
        page = wp.create();
        page.onResourceReceived = onResourceReceived;
        page.open(url, onOpen);
      }
    }
  
    function onResourceReceived(response) {
      var match, t = new Date(),
      url = response.url,
      status = response.status;
      t = t.valueOf() - start.valueOf();
      if (!!(match = url.match(/locator\.css/))) {
        console.log(match[0] + ': ' + t + 'msecs status: ' + status);
      }
      if (!!(match = url.match(/en-GB\.json/))) {
        console.log(match[0] + ': ' + t + 'msecs status: ' + status);
      }
    };
  
    function onOpen() {
      console.log('Test ' + count + ' done!!!');
      page.close();
      process();
    }
  
    process();
  }(phantom, require('webpage')));
  </code></pre>
  
  <p>This kinda runs how I expected except that each file is logged twice, why is this?
  Sometimes the time differences are very different.
      locator.css: 323msecs status: 200
      locator.css: 323msecs status: 200
      en-GB.json: 2199msecs status: 200
      en-GB.json: 2200msecs status: 200
      Test 1 done!!!</p>