and CORE-1079: Every attach of fbclient/fbembed library leaks 64KB of memory
To do it:
- created new template GlobalPtr, controlling access to destructors of global objects.
- applied it to global objects.
Also some related cleanup.
b) Add parameter names to declarations of TempSpace methods. It make sources much more readable, i believe, and allow IntelliSense to make useful hints
c) Reworked sort module to use more memory for merge buffers. It significantly increased speed of large sorts. Memory mostly reused from TempSpace memory blocks
2) Reworked error handling in SORT and its callers.
3) Replaced DLS+SortMem with the generic TempSpace class.
4) Replaced GDS temp file management with the TempFile class.
5) Various cleanup.