First big batch of Magic API classes.

No Spell stuff yet.
API update to allow simple spell casting

Also move several utility classes over to the API. Trying not to bloat
it, though!