Minor android bug fix and cleaned up web relay a little

We were logging something on the main thread that involved network
activity which makes Android unhappy so I put in a switch to turn it off
in Android.

I also refactored the web relay code so that the CORS headers are added
in a single choke point rather than having to remember to add them to each
response individually.