~samwhited/xmpp

xmpp/delay d---------
all: be more strict about stanza namespaces

Previously we were checking if something was a stanza based on faulty
assumptions (that there were only two valid stanza namespaces) and
without precision (we'd accept it if it were either namespace or none
instead of only accepting the actual namespace used by teh stream).
This PR fixes this to ensure that eg. a vulnerability that causes the
server to allow {jabber:server}message's sent over a jabber:client
stream without any of the normal security measures still won't affect
this library (hopefully).

This PR updates all locations to use the new APIs, but does not
necessarily perform the correct checks. A followup PR will be rquired to
upgrade some of the packages (eg. mux) to use the correct namespace.

Signed-off-by: Sam Whited <sam@samwhited.com>
all: add function stanza.Is()

Add exported function stanza.Is() which tests an xml.Name for its name
and space. If it is a proper stanza it returns true.
This function was repeatedly defined in several files and is now defined
one time and exported in stanza/stanza.go

Fixes #113
delay: add Insert function

This is just like Stanza except that it inserts into any element, not
just stanzas.

Signed-off-by: Sam Whited <sam@samwhited.com>
delay: minor typo fix in docs

Signed-off-by: Sam Whited <sam@samwhited.com>
delay: new package implementing XEP-0203

Signed-off-by: Sam Whited <sam@samwhited.com>