Added patch from Dmitry to fix crash on delayed message from contact not in roster

fixes #219
Merge branch 'master' into nextdev