Calendar: Check if the duration is empty before parser it when delete the events

If the event end time is 0, it will calculate the end time by "duration"
string. But if the "duration" is null, it will lead the NullPointerException.

So check the duration string is empty or not before use it to get the end
time when delete the events.

CRs-Fixed: 650814

Change-Id: I97350db4103959b851367beae53f09200a2a29b8