Fixed segfault and other possible bugs in msi.c

toxav should no longer have weird behaviour when a dead call times out.