Flush checkpoint handles prior to taking schema lock.

This should save time when flushing again while holding the schema lock.