Add ResultSet.wasApplied() for conditional queries (JAVA-358).