db: more thread robustness (but still unsure);
EventReceiver: unregister (fixes exception on service restart on arm emulator);
added "delete events before";