fix client initialisation call
fix build_stanza test
require CGI to escape entities
add test for entity encoding