Adding a clean_shutdown function

Function is designed to be a on stop place to clean up the entire
application at shutdown time.

v2: rebased atop 41c54e8

Signed-off-by: Joe Konno <joe.konno@intel.com>