Add checks for nested Swift classes

We unfortunately can't support them, so throw an exception when they're encountered during schema generation rather than failing in weird ways when the user tries to actually use them.

Closes #1036.

@alazier @jpsim