Added backend ability to select buttons randomly

This deals with the backend of #186.

In the future, we can certainly add extra parameters to this function to allow selection from a subset of all buttons, or alternatively, automatically load the subset of buttons from the database.

http://jenkins.buttonweavers.com:8080/job/buttonmen-blackshadowshade/309/