Rate limit messages by batching them

Ran grunt test.
Can we be smarter about this? Suggestion: rather than a 1 second threshold, lets reset the timeout to 100ms each time a message is received. That way a single msg still gets sent quickly (say if the user does interactive chat / invite), but batches of msgs get coalesced into a single xmpp request.