Fix the bug of mem overhead
Add func to easily recover from the last failure point
fix the problem in merge and sort, add a priority_queue to order the same docid posting