Add support to split sqlite among many files

Change sqlite key to raw hash
Add index to sqlite db