Fix variable name for AC_CHECK_PROG

SQLITE3 ->
have_sqlite3

"SQLITE3" is already used for detecting libsqlite3.
Fix wrong format strings in testDBClientAsura.

When I run the test case without this fix, some tests in it causes crash.
Fix a wrong format string in testDBClientAsura.

Sorry, previous commit still includes a wrong format string.
AsuraThreadBase: make sure to wait a child thread at destructor.

When I run tests without this fix, test_exitCallback crashes on my
environment.