Try to release thread local object before unload OV dll (#33670)
### Details:
- The `thread_local` was referenced to release the `stream` resources
when thread exit
- Implement code to avoid hold heap memory. Or it will report memory
leak in Appverifier tool.
### Tickets:
- [CVS-179009](https://jira.devtools.intel.com/browse/CVS-179009)
---------
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>