contrib: use batched JSON-RPC in linarize-hashes

Batch up to 10000 requests for a ~30x speedup.
Merge pull request #5050

772ab0e contrib: use batched JSON-RPC in linarize-hashes (Wladimir J. van der Laan)