Add LevelDB backend for exporter node sets

SQLite seems to slow down over time when a lot of data is inserted in it. This is an attempt at using LevelDB to have more efficient node sets.

Q: should we make sqlite/leveldb configurable, in case we want to support setups where it's not easy to install leveldb?

Migrated from D5315 (view on Phabricator)

Merge request reports