Turn memory off by default when sleeping
Prepare controller for sleep
Add ability to have the controller sleep when no work is pending.

Wakeup is automatic upon scheduled task or reception of a MIB message
Fix formatting bug in rpc error handler
Add support for sleeping controller
Make all flash routines wait for completion of op

This is so that we cannot enter a state where the controller goes to
sleep and powers down the memory before a write operation has finished.
Add callback for deciding when to sleep

This lets users of task_manager decide programmatically when
they can sleep based on information that task_manager should
not know about.
Update to use new task_manager flags API
Add sleep handler callback
Always send a bus reset pulse on controller reset

This makes sure that all modules reregister if the
controller loses power for some reason or gets reflashed
Fix fsu to use new taskloop flags interface
Merge branch 'dev' of github.com:WellDone/MoMo-Firmware into pr-controller-sleep
Merge branch 'dev' of github.com:WellDone/MoMo-Firmware into pr-controller-sleep
Clean up formatting and improve function naming.

- also add typedef'ed enums for more clarity
Streamline set_sleep call
Merge pull request #60 from timburke/pr-controller-sleep

Make controller sleep when not doing anything else
Merge branch 'dev' into sensor-api

Conflicts:
	momo_modules/mainboard/src/momo/memory_manager.c
	tools/pymomo/commander/commands/rpc.py