BUGS
----
* expire time may be affected by timezone and system time change (NOTE)
* verify return 0/1 everywhere

TODO
----
* Remove all calls to eprintf in the library functions
* Add disk database file checksum to verify if its broken or valid file
* ht->ls is wrong! dups appear
* implement mmap for w32
* implement sdb_ainc/sdb_adec
* implement io filters for load/save databases (io wrap)
* create string pool for a list of sizes
	newpool (sizeof (char), 10, 100, 1000);
* Add api to store serialized in memory
* Add api for raw bytes
* Add api and syntax for json_length()
* Add support for socket file for memcached api
* add api to create db without caching it before

Synchronization
--------------
 - each key/value have a timestamp of creation/modification
 - sdb_diff() must check both databases and look for removed entries
 - syncronization between hosts - realtime storage
 - run sync every N seconds? every N keys in cache?
 - sdb_log to dump to a file descriptor all sets.. as a stream

Optimization
------------
* remove endian conversions
* use slices instead of mallocs
* use strstore
* accelerate get ops with cached results (const char* instead of strdup)
* implement udp protocol for memcache
* rewrite mcsdb in luvit
* use 16 bit key and 16 bit value // dont think so
* use kernel's linked list? it should be faster..

StringPool
----------
string types:
  readonly
  numeric
  array
  word
  string

char *hugestring;
int hugestring_size;
{type;}
