Don't perform composite unless renderer has indicated it's idle

The rendergl::render_scene() function is being called more often than
it needs to be, sometimes before the renderer has finished.  This
could result in PNG images that are drawn before the frame trees set
in SetIds is rendered.
Add comments and improve performance of a comparison
Track whether first render has run, not whether it's currently idle
auto merge of #1418 : dhedlund/servo/composite_when_ready, r=pcwalton

The rendergl::render_scene() function is being called more often than it needs to be, sometimes before the renderer has finished.  This could result in PNG images that are drawn before the frame trees set in SetIds is rendered.