Shut up erroneous warnings about use of 'val' while uninitialized.
Update bundled sqlite3 to 3.7.17.

This should allow us some improvements using mmap (not used yet in pkgng
for the database)
Make gcc happy
get rid of deprecated pkg_name() and pkg_version()
Fix gcc warning
Fix time_t cast on i386 platform.

For i386 platform we need explicit conversion from int64_t to time_t.