Filter out "502 bad gateway" exceptions

Tests have shown that 502s are a regular occurence and tend to go away fairly quickly. They should be filtered out (there should be no notification to the MUC, see #15).

On this branch, this filtering is being implemented. It is currently in testing.