Introduce lightweight exceptions without stack trace

This pull request provides a more generic approach to the changes in #280.

Exceptions are expensive because filling in their stack traces is
expensive. If we use exceptions for control flow, we can avoid
filling stack traces that will never be used. This commit introduces
LightweightExceptions that do not provide a stack trace by default,
and rewrites existing exceptions that (conditionally) did not provide
stack traces into subclasses of LightweightException.
This overrides the `synchronized` superclass implementation with a non-`synchronized` one. Is my assumption correct that this is safe because this implementation has no problems with overlapping execution, unless it calls the superclass, in which case it will be synchronized?