Pretty messy change.

This pull request has two different changes in it. 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.

Also, I didn't test any of these changes. WoooooooooOOOOOOOOOOooooooo