Race condition

@ralphtheninja https://github.com/sinonjs/lolex might be useful for the tests here
I left level-ttl for a while, but want to go back to it once we're done with abstract-leveldown.
Good news: it looks like the recent changes in leveldown (deferring close with pending put or iterator, or something else) decreases the likelihood of the race issue. If I change the tests to use memdown the race issue happens more often.
That gives us a lead.
Correction, memdown failed tests because its iterator yields a different key type than leveldown. Trying to figure out why - before further investigating the race issue because there could be a larger issue in subleveldown or other.
Okay. The "problem" with memdown is that, when wrapped with encoding-down and the utf8 encoding and you put() a Buffer, then you'll always get back a Buffer because memdown only uses keyAsBuffer to determine whether it should convert a stored string to a requested Buffer (when keyAsBuffer is true), and not whether to convert a stored Buffer to a string (when keyAsBuffer is false, which is the case with the utf8 encoding).
See https://github.com/Level/community/issues/58#issuecomment-487354041 for an illustration.
I could argue that this makes sense - typically you want the output type to match the input type and level-ttl is at fault for mixing string and Buffer keys - but in any case it's not a situation we can escape from atm. So, long story short, level-ttl (or at least its tests, because it looks like the problem only applies to internally used keys) should take care to convert keys to whatever type is expected.