Fix testgdi

The testgdi program makes GDI+ calls without invoking
GdiplusStartup().

This fixes the following errors:

got st: 3 expected Okgot st: 2 expected Okjpg drawn
got st: 3 expected Okgot st: 2 expected Oktif drawn
got st: 3 expected Okgot st: 2 expected Okgif drawn
got st: 3 expected Okgot st: 2 expected Okpng drawn
got st: 3 expected Okgot st: 2 expected Okbmp drawn
Silence autotools warning

Modern autotools complain that

warning: autoconf input should be named 'configure.ac', not
'configure.in'

The file is explicitly used in autogen.sh, which needs to be updated
consistently.
Cleanup autogen.sh

Remove dead code and do not warn about configure being run without
arguments if configure is not going to be run at all.

This also makes it more consistent with the mono autogen.sh.
Fix crash due to uninitialized variable

png_get_tRNS doesn't initialize supplied variables when no transparency chunk is found (see http://sourceforge.net/p/png-mng/mailman/message/27133707/).
In that case the trans_alpha variable still has its initial (indeterminate) value which leads to the crash when using it in set_pixel_bgra() later on.
We now check if the transparency chunk is valid before accessing it.

Commit licensed under MIT/X11.
Use correct type for variable

This was changed in PR#8, but the correct variable type is png_charp according to a clang warning and the documentation (http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Desktop-generic/LSB-Desktop-generic/libpng12.png.get.iccp.1.html).

Commit licensed under MIT/X11.
Move the call to png_get_PLTE() up so it initializes the png_palette and num_palette variables in all cases.
This fixes accessing an uninitialized variable e.g. in the 2bpp case.

Commit licensed under MIT/X11.
Removed pen adjustment for Cairo >= 1.12

On modern versions of the Cairo library pen adjustment is no longer necessary.
This fixes errors in the Mono System.Drawing testsuite caused by wrong adjustment when using such a version.
Merge pull request #17 from akoeplinger/fix-libgdiplus-crash

Fix libgdiplus crash
Merge pull request #19 from akoeplinger/fix-cairo-pen-adjustment-on-linux

Removed pen adjustment for Cairo >= 1.12
Merge pull request #15 from ranma42/improve-autotools

Improve autotools
Merge pull request #16 from ranma42/fix-testgdi

Fix testgdi
Removed bundled cairo and pixman.

Commit licensed under MIT/X11.