Made sure cursor.close() does not complain if cursor is already closed on Oracle

Refs #22483
Fixed #22498 -- constraint name was not quoted in FK creation SQL