Refactor connection.transports.bosh module.