Fix compilation on PHP 5.3.x before 5.3.7

See: php/php-src@997f323e3afd74819a12a8289197c18b3c447bdf
Merge pull request #422
include windows for struct timeval.
Rerranged those includes into types, so we don't have to do this in every file in mcon.
cursor.h is one level higher, so adjust path.
Make sure that the sources get linked into the extension, and not the main PHP library

This took me litterally hours to find, with no helpful messages from
either the Windows linkers or compilers :-/
Fixed some warnings and make sure PG and EG can be accessed.
Merged pull request #421
Back to -dev.