add singleton facility [not finished yet]
modified on singleton & at_exit_manager
1. finish singleton
2. change AtExitManagerCallbackType