send updates to solr in batches.

The update function collects the docs to be updated and the flush
function sends them to the solr server. The docs will be auto flushed if
the number of pending updates is > 100.

This seems to have improved the solr update time considerably.
temp fix to process_stats.py