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 async ajax post, and a manual redirect to the exploit page when complete.

Verification:
- [x] 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