This reverts commit 7af73c3471. Doesn't look like the right approach for adding support for XEP-0156. Work on that will continue in a branch in the meantime.
7af73c3471