close cursor of sqlite