Merge pull request #56 from sunyc/i11-db-fix

Fix db.c without PACKAGE_ASYNC. (mactorg@lpmuds.net)
Fix 64bit runtime in 32bit mode.

Fixes #40.
Noted one memory leak in unique_mapping().
Tests improvments.
Extended various sprintf buffer, to avoid crashes when printing out
numbers and floats.