Pretty messy change.

There are two basic changes in this commit. I couldn't separate them out
because they're related.

1. Fix team selection logic to check for team size.
2. Refactor mission starting and fix a bug where the bot would only ever
start the first mission.
Merge pull request #2 from gmoomau/mission

Pretty messy change.