Move appendWsUrls out of FailoverProxy class and export as an independent function.
Rationale:
Code simplification - the function does not depend on any internal state of FailoverProxy
Make the function reusable outside FailoverProxy scope, especially in the new node selection (ping) feature
Regarding function location:
Although the function is separated from the class, keeping it in failoverProxy.ts is reasonable because:
The function was originally designed to handle proxy URLs and is closely tied to the Endpoint interface, which is still defined in failoverProxy.ts
Note: The function is only used in tests, not found in other directories, so only need to adjust the import in test.ts.