Wait for label & co.

This is a better version of https://github.com/n1k0/casperjs/pull/540, using a separate branch for the changes.