[12459] Calendar, correct a server freeze when gquit. Olso correct a memleak and optimise a little bit CalendarEventInvite handler by not send sql request when player is online to get his ignored char list.

(based on commit [12350] - 1a191a2)