Allow setting the event uid

If the event.uid is defined, it is used as the event's uid.
Otherwise, a uid is generated.

Necessary when trying to send modifications and cancellations of events.