Fix types when set automatic flag.

On i386 machine sizeof(long) != sizeof(int64_t), so when we are
trying to extract int64_t using va_list we will likely corrupt
stack if real argument is of long type.

TODO: check other places for a similar problem.

Forced mode does not implicitly turn on update flag for pkg_add.

Make sqlite error in sql_exec slightly more informative by using
standard ERROR_SQLITE macro.