Added process-wide exception code registry

Added an API for registering exceptions so that they get unique codes with
names and descriptions assigned to them. This allows native modules to
throw custom exceptions and have sensible error messages in applications,
or (if they're not caught) in the VM dumps.

Includes thread safe shared API state management and related refactoring.

Also added rudimentary support for it to the Audiality 2 wrapper, though
it hardly throws any exceptions at this point. (See #8.)

Closes #44.