serial: do onthing if the size of read/write is zero

Return early if the size is 0 as there is nothing to do.
serial: set the errno if and only if in thread context

The errno is associated with threads. It will crash the thread if we set
it in interrupt context.
k60: add rt_interrupt_{enter,leave} in IRQHandler
Merge pull request #186 from grissiom/serial-fix

Serial fix