fixed multiple onResourceReceived events for one real event

https://github.com/ariya/phantomjs/issues/10158