feat: unprepare statement references after sql execution
Summary
Picodata SQL now manages the Tarantool statement cache using a dedicated SQL fiber that handles preparation and unpreparation of statements based on an LRU eviction policy. Prepared statements can be executed across different sessions by SQL clients.
Previously, when a client executed a prepared statement, it increased the reference count in the statement cache and linked the statement to the client's session. While this approach seemed fine, it caused issues during eviction, as references to these statements remained in client sessions, preventing proper eviction.
This commit addresses the issue by ensuring that if a statement is added to the current session during execution, it is removed and the session state is restored once execution is complete.
Discussion: