Fix issues 77, 87, 182, 190.
Additionally, fix the bug described in
https://groups.google.com/d/msg/leveldb/yL6h1mAOc20/vLU64RylIdMJ
where a large contiguous keyspace of deleted data was not getting
compacted.
Also fix a bug where options.max_open_files was not getting clamped
properly.