Delete message by reply_to_message_id instead of disabling foreign key checks
Delete message by reply_to_message_id instead of disabling foreign key checks

Summary: Disabling foreign key checks breaks our test suite and probably causes other bad behavior. Deleting messages where reply_to_message_id = NULL also prevents issues with foreign key contraints

Test Plan: Tested locally

Reviewers: emfree

Reviewed By: emfree

Differential Revision: https://phab.nylas.com/D2508

jobscore/sync-engine,jobscore/sync-engine,nylas/sync-engine,closeio/nylas,closeio/nylas,jobscore/sync-engine,jobscore/sync-engine,closeio/nylas,nylas/sync-engine,nylas/sync-engine,closeio/nylas,nylas/sync-engine