Move exception classes into their respective subpackages/submodules

See CHANGELOG.md for a description of the changes. Fixes #577.