segfault when batch has nullish key/value

Was getting `segfault: 11` if I inserted a null key or value during a batch.

This PR adds tests to check that batch errors correctly,
and then adds a check.

maybe you want to cherry pick the test commit and do the null check in leveldown

also rvagg/node-leveldown#19