Deck validation

This is a rather long pull request that does a few things.  I kept the commits as atomic as possible so it's probably easier to review the commits one-by-one.

Overall, this commit adds deck validation support (along with tests) to verify users only run legal decks.

There are also some commits to clean up a few things like static keywords, and fixing some typos.

Let me know what you think