For what it’s worth, the IRC transport in the IM Gateway plugin is the only one that supports MUC. It’s hard to say whether writing something from scratch or extending the IM Gateway plugin would be the best way to go. I do have an intention to make the IM Gateway plugin “pluggable” at some point. So folk could plug there own protocols into it. But that doesn’t help you “right now”. Since I’m not really writing it right now with the intention of folk adding their own, I don’t have any documentation up to help with it. I do have a lot of javadocs in place, but you’d have to generate them and such in an easily readable format.
Honestly, the best “books” for XMPP are www.xmpp.org. Especially www.xmpp.org/extensions. There you can find XEP-0100, which is the specification for gateway interaction, which might be a good starting point!
And unfortunately, yes, Spark does have specific support for transports. Most other clients have support for simple service discovery. Now, being that I’m now the lead deveoper for Spark as well, I may adjust that some. (at least add a good service discovery browser, we’ll see) Spark doesn’t -need- the custom support though, as if you register the user with the transport using the admin interface or another client, it doesn’t use the custom registration method that makes the transport “only show up in spark”.