Issue 2710 wsapi ver lock

READY FOR FINAL REVIEW!

Large portions of @ozten's original code from f2adc7aad1c3321f398dd83e9349610ba8514897 as well as an updated version of @lloyd's PR #2284 to turn version() into an asynchronous function are used.

The asynchronous version() is used because generate_code_version was using the randomly generated SHA that is returned before git has finished fetching the code version from disk.

Instead of placing the SHA into the wsapi URL, it is placed into the BrowserID-Version HTTP header.