Bug 999351 - Fix an IPC leak by clearing MessageChannel resource before destruction. r=bent a=1.3t+

Once we have a channel error (like, child process dies) we don't immediately do
anything with additional messages that were pending from that child. They stay
queued and eventually get freed when the channel is destroyed. This patch clears
the resource earlier whenever there is an error, or the channel is closed.