More browspr fixes:
* Move the EndpointToWs function into its own file.
* namespace.SetRoots method must use EndpointToWs.
* Add a sleep with a TODO to prevent a race condition.
* Bump the wspr retry time to 2 seconds.

Change-Id: I47e2938fe4a2bf920cb006ea1e6afc5a71db55d0
diff --git a/services/wsprd/app/app.go b/services/wsprd/app/app.go
index ed321a0..3322afb 100644
--- a/services/wsprd/app/app.go
+++ b/services/wsprd/app/app.go
@@ -54,7 +54,7 @@
 	// TODO(bjornick,nlacasse): Remove the retryTimeout flag once we able
 	// to pass it in from javascript. For now all RPCs have the same
 	// retryTimeout, set by command line flag.
-	retryTimeout = flag.Int("retry-timeout", 0, "Duration in seconds to retry starting an RPC call. 0 means never retry.")
+	retryTimeout = flag.Int("retry-timeout", 2, "Duration in seconds to retry starting an RPC call. 0 means never retry.")
 }
 
 // Temporary holder of RPC so that we can store the unprocessed args.