Re-factoring continued for Motion library
* Removed duplicated code
Fix in handling of CThread deletion when thread was not started
Change-Id: I6cc7fe48b3b2e27712ce6df0e70c2e10bb287da0
Re-factoring continued for Motion library
* Added motion profile generator
Added ability to create threads using lambda functions instead
of having to inherit from the CThread class.
Change-Id: Iecb91481468764b8f550bfc6f51aa3089389c0fd