Bug 845842 - Use promises that resolve on later ticks; r=rnewman, a=bajaj

This is meant as a temporary workaround until a built-in promise library
offers similar functionality.
Bug 849888 - Enforce minimum buffer size in sub_send_msg r=jesup a=bajaj