Fix missing ctype.h includes

libavutil/common.h stopped including ctype.h, and some source files were
relying on recursive inclusion of this header.