Added 'minrate', 'maxrate' and 'bufsize' options, and fixed a race condition in SyncDiagram.