cylc daemon: performance improvement under heavy load

This improves the performance (reduces the time taken) of the main scheduler loop under heavy load (c.f. @matthewrmshin's recent example load suite).

@hjoliver, please review.