[ASTERIXDB-2204][STO] Fix implementations and usages of IIndexCursor - user model changes: no - storage format changes: no - interface changes: yes - IIndexCursor.close() is now idempotent and can be called on a closed cursor. - IIndexCursor.destroy() is now idempotent and can be called on a destroyed cursor. - Add IIndexAccessor.destroy() letting the accessor know it is safe to destroy its reusable cursors and operation contexts. - Add IIndexOperationContext.destroy() letting the context know that the user is done with it and allow it to release resources
details: - Previously, implementations of the IIndexCursor interface didn't enforce the interface contract. This change enforces the contract for all the implementations. - With the enforcement of the contract, all the users of the cursors are expected to follow and enforce the expected lifecycle. - Test cases were added.