twfb: Add preliminary database layer.

This supports only what is used by the benchmark, but supports both
MySQL Client API and SQLite 3.
twfb: Wire up the database abstraction layer.

Things are not yet working, not even SQLite. MySQL hasn't even been
tested. But it is already building.
twfb: Fix SQLite portion of database layer.

db, queries, and fortunes benchmarks are running.
twfb: Make MySQL portion of database work.
twfb: Ensure randomNumber is no larger than 10000.

This is the result of UPDATE World SET randomNumber=randomNumber%10000.
Use __builtin_unreachable() instead of a few macros.

This has been introduced in GCC 4.5.
twfb: Ensure number of rows is >0 before calling calloc()
lwan.ws: Fix typo.
twfb: Make database and statement opaque structures

Not only good for API consistency, but also provides some insurance that the
first parameter being passed to each function pointer is the same (or at the
very least, the same db_* type, so that they point to the same functions).
twfb: Try to reuse prepare database statements as much as possible

This gave a ~2.4x speed increase in queries benchmark.
twfb: Execute MySQL prepared statement again after db_stmt_bind()
twfb: Get rid of json_strdup(), use strdup() directly

We don't really care about platforms where strdup() isn't available.
callback was replaced with handler in url_map