events, tests: use reinterpret_cast to the event data where possible (without unnecessary casting through pointer to the event data).
events: for attribute event use reinterpret_cast instead of static_cast.