Task improvements.

Allow tasks to return errors.

Make kore_task_channel_read() return the number of bytes
that was coming in, this way we can detect any truncations.
Sprinkle volatile