DDLog: calling atexit_b in CLI applications, that use Foundation framework.

Related to #63, #184. Fixes #233.
Merge pull request #234 from dvor/ddlog-fixing-bug-in-cli-with-foundation

DDLog: calling atexit_b in CLI applications, that use Foundation framework.