[Trivial] Mark monitor functions `pure`/`nothrow` if possible.

Also fix some `core.exception.*Error` functions attributes in modules.

See also [Issue 11216 - Make synchronized statement `nothrow`](http://d.puremagic.com/issues/show_bug.cgi?id=11216).