Mark libc ctype functions as pure where applicable.

Same as the pull for https://github.com/D-Programming-Language/druntime/pull/285

Except removed the mathlib bits, leaving the ctype/wctype functions in place.