Support exmode and expose an API for manual control over this
By default we want to warn the user about compile-time errors, and replace these errors with <raise>
elements that raise runtime errors. This is necessary in order to conform with the spec.
We would also like to support exmode=strict which would cause the compiler to stop execution if it finds errors at compile-time.
Relates to #305 and #191 (closed)