It seems that sometimes EDTT can send a command before cs/cc is consumed
by get_event and this triggers an error since cmd buffer is reused for
cs/cc and thus it will be queued as an event on edtt_q_event.
Not sure if this is an EDTT issue/feature or smth on our side, for now
we can workaround this by simply creating a copy of cs/cc which can be
safely enqueued on edtt_q_event waiting to be consumed and freed by
get_event while original cmd buffer is freed as soon as cs/cc is
processed.
This reworks events handling in EDTT.
The "service_events" routine is now handled in separate task which
blocks until new event is put in queue. This is possible since we use
os_eventq to pass events and this means any get from queue will put
task to sleep properly and trigger context switch if necessary.
The blocking edtt_read() will now sleep if not data is available instead
of advancing time machine forward so it does not interfere with timing.
OS_TICKS_PER_SEC was increased to 1024 to have better granularity and
allow ~5ms sleep time for edtt poller task as required.
Also some non-LL code is simplified to use simple calloc/free as it does
not really seem to be cessary to use mempools there, i.e. we just need
some memory block to pass data and it does not really matter how it's
allocated. Also using calloc/free means we will never run out of memory
so no need to check for that.