make some wrapper functions to handle API post and make various other JS functions to use them

* Partially addresses #468 (i still need to refactor Game.js, but want to go ahead and issue a pull for this to expedite testing of whether what i've done so far fixes #441)
* Jenkins: http://jenkins.buttonweavers.com:8080/job/buttonmen-cgolubi1/96/