Updating and integrating CommandManager.

Added the set_commands_to_run function to CommandManager.
Added test for above function.
Updated test in test_smart_worker.py so it will use CommandManager.
smart_dispatch.py now use CommandManager.