Some minor changes and corrections

SQL Driver and missing close socket connections

Signed-off-by: Pedro Nunes <pgh.nunes@gmail.com>
Disable database maintenance on startup (re-create indexes)

Signed-off-by: Pedro Nunes <pgh.nunes@gmail.com>