event: reimplement in C++.

Sometimes doesn't crash. May cause kernel panic (probably kdbus bug).