Add MMR process, using random similarity for now

TODO: comput similarity between documents.
Add setter and getter for totalWords variable
Fix the MAP bug
Add the batch GetDocTermStats
Update MMR re-ranking
fix bug with negative score
Add PortfolioReranker and Update BacthGetDocTermStats
Roll back unnecessary changes
Add MAP switch in batch summary, false by default
Redesign the -r and -br arguments, using -m to specify the underlying model
fix batchgetdoc