framework/task_manager: Fix stop and exit cb NULL check and move location of pthread data free
framework/task_manager: Fix stop and exit cb NULL check and move location of pthread data free

1. If TM_STOP_CB or TM_EXIT_CB is not set, we should skip calling its callback
2. Move the location of pthread data free logic
3. fix coding rule
4. add typecasting for setting cb
5. add missing '=' operation for checking current handle count

pillip8282/TizenRT,an4967/TizenRT,davidfather/TizenRT,davidfather/TizenRT,jeongchanKim/TizenRT,junmin-kim/TizenRT,an4967/TizenRT,an4967/TizenRT,pillip8282/TizenRT,sunghan-chang/TizenRT,sunghan-chang/TizenRT,JeonginKim/TizenRT,jeongchanKim/TizenRT,Samsung/TizenRT,Samsung/TizenRT,pillip8282/TizenRT,Samsung/TizenRT,chanijjani/TizenRT,Samsung/TizenRT,junmin-kim/TizenRT,davidfather/TizenRT,HONGCHAEHEE/TizenRT,jeongarmy/TizenRT,HONGCHAEHEE/TizenRT,jeongarmy/TizenRT,davidfather/TizenRT,Samsung/TizenRT,jsdosa/TizenRT,HONGCHAEHEE/TizenRT,jeongarmy/TizenRT,chanijjani/TizenRT,davidfather/TizenRT,jsdosa/TizenRT,jsdosa/TizenRT,jeongarmy/TizenRT,jsdosa/TizenRT,an4967/TizenRT,junmin-kim/TizenRT,chanijjani/TizenRT,junmin-kim/TizenRT,Samsung/TizenRT,jeongchanKim/TizenRT,an4967/TizenRT,junmin-kim/TizenRT,JeonginKim/TizenRT,sunghan-chang/TizenRT,jeongarmy/TizenRT,jsdosa/TizenRT,HONGCHAEHEE/TizenRT,pillip8282/TizenRT,pillip8282/TizenRT,jeongchanKim/TizenRT,JeonginKim/TizenRT,sunghan-chang/TizenRT,jeongchanKim/TizenRT,pillip8282/TizenRT,jeongarmy/TizenRT,an4967/TizenRT,jeongchanKim/TizenRT,davidfather/TizenRT,jeongarmy/TizenRT,davidfather/TizenRT,JeonginKim/TizenRT,HONGCHAEHEE/TizenRT,Samsung/TizenRT,JeonginKim/TizenRT,an4967/TizenRT,JeonginKim/TizenRT,chanijjani/TizenRT,jsdosa/TizenRT,sunghan-chang/TizenRT,chanijjani/TizenRT,pillip8282/TizenRT,junmin-kim/TizenRT,sunghan-chang/TizenRT,jeongchanKim/TizenRT,junmin-kim/TizenRT,jsdosa/TizenRT,HONGCHAEHEE/TizenRT,sunghan-chang/TizenRT,chanijjani/TizenRT,chanijjani/TizenRT