Trim undo list down to at most size sz. Call this periodically to prevent the undo-list from growing beyond a certain amount of memory.