Encode integer values on a variable number of bytes.

The design always supported this, and the read-path already supports
reading those, but the write path never really bothered and always
wrote all integer values on 8 bytes no matter what.
Add an API to store double-precision floating point values.
Fix compaction bug: flush compaction queue if it's too old.

The compaction queue needs to be flushed if either it's grown too
large or it's been too long since the last flush.  That second
condition wasn't implemented properly because the timestamp that
tracks the time at which we last flushed was never set and always
remained 0.  This would only impact very low-traffic TSDs that
never manage to exceed the threshold on the size of the queue.

Thanks to Brent Evans for spotting and reporting this bug.
Simplify the condition under which we flush the compaction queue.

This code is equivalent to what we had before.  Given the constants
in the code, we were only flushing based on the queue size when one
of those two conditions was true:
  - The size of the queue is bigger than 100
  - The size of the queue is bigger than 18000
Which obviously can be simplified as checking only against 100.

Thanks to Brent Evans for pointing this out.
Don't bother flushing the compaction queue based on time.

If someone is writing to less than 100 rows ever then compactions
probably don't actually matter (and can always happen lazily during
read accesses).

Thanks to Brent Evans for the suggestion.