Fixes nil error in BrowserExploitServer

RM #8762:
https://dev.metasploit.com/redmine/issues/8762

I also removed the synchronous AJAX POST of the gathered metadata. A synchronous request here adds some unnecessary overhead to the UI which is annoying on mobile connections and is especially noticeable when the URL is injected via iframe into a persistent XSS. Instead I do an actual form POST, which the module immediately redirects to the exploit GET URL. This removed the need for hash URL encoding and base64 encoding (not really sure why that was there), since the form handles that natively. I added a few specs for the new js and the changed request/redirect pattern.

Verification:
- [ ] Run any module that uses BES, visit it in your (applicable) browser
- [ ] the module should serve the exploit
- [ ] refresh the exploit page in your browser
- [ ] you should not receive the exploit again
- [ ] `rerun` the module, and refresh it in your browser
- [ ] the module should serve the exploit again
- [ ] refresh the exploit page in your browser
- [ ] you should not receive the exploit again
- [ ] specs pass