Implemented DuinOS

Original firmware code refactored as tasks of DuinOS.