JAVA-1165 ensure array and itcount methods always close cursor server side even on IO error