Add functions declared in ctype.h to builtin function database. All functions are annotated with nothrow and const attribute, which enables better optimization.
This patch has been accepted and committed in r266199(http://reviews.llvm.org/D18970, http://reviews.llvm.org/rL266199), but reverted because newly added test caused build bot failures(http://reviews.llvm.org/rL266201). I fixed the test and resubmit patch here.