Still attempt to find Cairo even if pkgconfig fails

Under certain circumstances, pkgconfig won't successfully return the include and library paths for Cairo, however cmake will still manage to find them with find_path and find_library.

Specifically, this can be an issue if Cairo is installed using Homebrew on Mac OS X, which just relies on X11/XQuartz for some of its dependencies. This is a problem because /opt/X11/lib/pkgconfig/ is not visible to pkgconfig by default, so instead of returning the include and library paths for Cairo, pkgconfig just complains that dependencies are missing (even though they aren't).

Even without the hints from pkgconfig, cmake will still manage to find the correct paths in most cases, especially if they are sensible like the Homebrew defaults of /usr/local/lib/libcairo.dylib and /usr/local/include/cairo
Merge pull request #13 from mcs07/findcairo

Still attempt to find Cairo even if pkgconfig fails
Fix potential crash from parsing output format for MIME type.

Heads-up from Mayhem project and Daniel Leidert.
Fix minor syntax warning with Clang -- clarify sign inversion.
Fix invalid sscanf format string and a variety of minor bugs.

Bugs found through Coverity Scan.
Merge remote-tracking branch 'upstream/master'
Merge branch 'master' into gamess_changes