minor bugfixes

require erlang-sqlite3 to figure out when extension loading is enabled; fix compiler warning and correct error handling for invalid sql_numbers