refresh queuing

This replaces the wait-for-refresh (or "update") logic with a
queue that tracks the updates and will wait only for those updates
that cover overlapping sections with an update newly scheduled.

Adds some debugging output, too.