droonga-engine: handle SIGINT and SIGTERM