Resolve __random button selections only after all buttons have been selected

Fixes #1157.

Requires database update 01157_random_button.sql

http://jenkins.buttonweavers.com:8080/job/buttonmen-blackshadowshade/377/
AJ> Is it our policy to require a newline at the end of every file?

https://github.com/buttonmen-dev/buttonmen/wiki/Developer-guide%3A-coding-style doesn't say; maybe it should (either way).