execute and commit insert statements in batches of 1000

This improves performance significantly, especially when
accessing postgres db on another server.
huge cleanup: removed unused code, function parameters...

Removed batching, path filtering, multilingual_thesaurus and
subcategory options because we don't use them anymore.
Also removed commented code that is not used.
additional pep8, update lc interface definition
replace zLOG with logging