Fix bug caused by message sends being able to fail twice - once due to timeout and once due to a network error. We wrap sent messages in an envelope (promise) that can be marked as succeeded/failed and has a timeout built into it.