JS cleanup

This PR depends on (and includes commits from) #1568.  #1568 will need to be merged first (I'll rebase this against master afterward)

There's a few logic changes that will need to be tested prior to merge -- I can't go through and test these currently since `make run` is failing for me as I'm missing a couple dev packages that I won't be able to install until tonight.

Formatting changes (some of them):
- Moved curlies so they're no longer on their own line (for functions and if/else statements)
- Made sure indentation is 4-space
- Gave JSHint some cookies to make it happy
  - We're no longer using leading `+` or `?` -- JSHint doesn't have a `laxcomma` equivalent for either of these
  - Sprinkled in some semicolons where they were missing
  - Scraped off some extra semicolons
  - Refactored some code so functions were not being conditionally defined (see `payments.js` lines `177-228`, `344-384`)
  - Changed the way a few for loops work (see `horn.js` lines `38-39`; `team.js` lines `48-49`, `101-102`)
  - Dropped what appeared to be an unnecessary `new` on `Gittip.team` in favor of just executing it.  JSHint said it was weird before

Things to do before merge:
- [x] Rebase after #1568 is merged
- [x] Check `payments.js` lines `177-288`, `344-384`
- [x] Check `horn.js` lines `38-39`
- [x] Check `team.js` lines `48-49`, `101-102`
- [x] Check `Gittip.team`