improved handling of XML Declarations
moved some bosh code autside core
select relative WS URLs with option parameter