test: add `agent` option tests for WebSocket and XMLHttpRequest backends

The `agent` option is only relevant for Node.js...