leveldb fold hardening for 1.4

moved to 1.4 and adapted for changes there.  Requires the same tests.  Adding filtering to the index seemed like the minimal change to the code, but I can see the argument for handling it in the backend for separation-of-concerns reasons.  If it bothers you, please let me know.