The Try/Catch blocks were checking that the context had not changed -
unnecessary and cexcept cannot handle separate (potentially interleaved)
contexts anyway. Changed the code to make the Catch re-instate the context -
this should help the compiler because the context is the png_store and
minimising the need for the compiler to avoid optimizing it away is good.
The changes include support for function attributes in VC in addition to
those already present in GCC - necessary because without these some
warnings are unavoidable. Fixes include signed/unsigned fixes in
pngvalid and checks with gcc -Wall -Wextra -Wunused.
VC requires function attributes on function definitions as well as
declarations, PNG_FUNCTION has been added to enable this and the
relevant function definitions changed.