(#1918) properly destroy leveldbs with prototype