Prevent rendering race conditions with slow APIs.

You have three pages: A, B and C; where B takes 2 seconds to load it's data from the API and the other two are relatively instant. You start at A, click B then click C (without waiting for B to load). The previous result is that you see A's content, then C's content, then finally B's content. But the address bar shows C's URL, since URLs update immediately independent of page load time. C's URL with B's content?! ARGH.

This change is a simple fix for this by counting requests - if you've initiated a new page load before the old one completes then the old one will never render.

WARNING: this does not work around issues such as triggering `action:end` for the old request or anything like that.
Merge pull request #360 from benjie/patch-3

Prevent rendering race conditions with slow APIs.