indexer-api: add app commands (dump, naked api); cache and batch inserts; move pgdb from database to indexer; refactoring