a2_Close() on a substate only actually closes that substate

It's now actually possible to close only a specific substate, without
it taking pretty much everything along with it.

Waves, programs etc are only unloaded when closing a master state.

Fixes #91.