handle closing of ResultSets and statements correctly. Fixed #3