scan order tables
trquant: store QpParam for each component
rc: add 2 pass logic in rateEstimateQscale
rc: fix sliceType of 2nd pass from prev pass stats

avoid doing sliceAnalyse in lookahead for 2nd pass
rc: generate cutree offsets for 2nd pass from stats
rc: fix warnings in ratecontrol
rc: prevent deadlock on encoder flush or close

1. add a terminate() function to unblock any blocked rate control methods
2. never block if the order ordinal is already above the required ordinal
3. simulate start events when encoder is flushing

Without these changes, closing the encoder without flushing (CTRL+C in the CLI)
or encoding fewer frames than frame encoders (-F8 -f4) could cause deadlocks