[RDY] Improve functional tests and perform explicit K_EVENT handling

- Improvement/fixes to functional tests
- Only emit K_EVENT when callers have enabled it with `event_enable_deferred()`

The second item is required because the code is still too messy and cannot cope with asynchronicity in every state.