Change the Exception/Error constructors to @safe pure nothrow

This is a druntime fix-up for the compiler bug 10254.
Merge pull request #512 from 9rnsr/fix10254

Change the Exception/Error constructors to @safe pure nothrow