Unregister CLI commands on exit

This patch ensures that CLI commands enabled by DEBUG_FD_LEAKS and
DEBUG_THREADLOCALS are cleaned up properly on exit.

(closes issue ASTERISK-22238)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    debug_cli_unregister.patch uploaded by Corey Farrell


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@397106 f38db490-d61c-443f-a65b-d21fe96a405b