json import tool: add basic error handling

Adjust the import tool so that it doesn't give up on the first error when importing records. Also report what record causes a problem (line number + json dump). After a configurable number of errors, the imported is aborted. In the case of json_lines import format, it can cope with json syntax errors.
Also added extra progress indication every 50K records (besides the dot printed every 1k).