Change the exceptions/errors constructors to @safe pure nothrow

This is a druntime fix-up for the compiler bug 10254.