manager: Register atexit shutdown routine only once.

* Made register atexit shutdown routine only once in __init_manager().

* Fixed some initial load failure conditions in __init_manager().

* Made reset options to defaults on reload when the reload will actually
happen.

* Fixed the order of unreferencing a session object in session_destroy().

* Removed unnecessary container traversals of the white/black filters
during session_destructor() and manager_free_user().

* ast_free() does not need a NULL check before calling.


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@406359 f38db490-d61c-443f-a65b-d21fe96a405b
res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practical

Review: https://reviewboard.asterisk.org/r/3141/


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