Close sqlite persistent connection on SIGINT, SITERM or SIGKILL