After discussions with Keith Bostic I've learned that always specifying the
full type (u_int32_t rather than int) as a general rule is not always a good
idea. Now, as I review code I'm reverting some of those changes. The new
rule of thumb is to use explict typing only in places that require it.
Allocating the functions hash_t struct as an extension to the dbsql_db_t struct
was foolish. Allocate it on the heap, remember to free it when we close the
database.
There was no need to maintain random number generation state within the DBSQL
structure, that is removed and now static within the two functions requiring
random number generation. The placement of the function hash table in the
memory allocated for DBSQL was wrong, that is now fixed.