Bug fixes and AI improvements.

AI changes:
- Extended the concept of "rank difference" to "board rank difference" and "side rank difference" -- in short, the AI now considers all owned cards on the board and will "guard" cards with bad positions (e.g. cover low open ranks) instead of ignoring them.
- Made the previously described behavior ("minimum rank difference") the default, eliminating a lot of duplicate code.
- "Balanced" AI will now choose lower card levels when possible, similar to other AI types.
- "Defensive" AI no longer turns "offensive" for rank difference zero (greatly simplifies code, and it was minimally helpful to start with).

Fixes:
- Restarting during a card placing animation caused a crash.
- CardResult.captures() used the wrong position value in element compares for combos.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>