added waitForRoute function to client template

Use like this:
```
client.eval(function() {
	waitForRoute('/path/to/route', function() {
		doSomethingAsSoonAsThePageIsReady();
	});
});
```
I tested it like this and it seems to work. The page appears to be fully rendered when the callback executes.
I would have updated the gh-pages as well but I don't exactly know how and where to put this in the docs. Any suggestions, @arunoda, @lalomartins?