sqlite3: shuffle the code so it's aligned with xmlgen.cpp

this way, it's easier to see what's missing from sqlite3gen

Signed-off-by: Adrian Negreanu <groleo@gmail.com>
sqlite3: be more careful with includes

return-ing on a "step" error skips over
the remaining file contents.

Signed-off-by: Adrian Negreanu <groleo@gmail.com>