Fix lazy leaks in tests

I'm really bad about this sometimes...
Slight memory fix in sphia_free

When destroying Sophia pointers, `db` must come first
iterator: destroy if we couldn't create a cursor
test: Fix 'free' warning
test: fix count 'key' leak
get: Fix invalid read
test: Remove intentional nasal demon
fail
iterator: Fix invalid reads
src: Remove unnecessary checks
Merge pull request #50 from sphia/wip-fix-leaks

[WIP] fix leaks