Fixed compilation against thread-safe PHP (ZTS)

This (hopefully) fixes [bug 541](http://trac.osgeo.org/geos/ticket/541).

I found the root cause of the build errors in the [PHP manual](http://php.net/manual/fr/internals2.memory.tsrm.php):

> While developing extensions, build errors that contain "tsrm_ls is undefined" or errors to that effect stem from the fact that TSRMLS is undefined in the current scope, to fix this, declare the function to accept TSRMLS with the appropriate macro, if the prototype of the function in question cannot be changed, you must call TSRMLS_FETCH within the function body.

Adding missing `TSRMLS_FETCH()` macros, fixing a confusion between `TSRMLS_C` and `TSRMLS_CC` (the latter is prepended with a comma), and removing a seemingly misplaced `TSRMLS_DC` fixed the build on ZTS. Needless to say, it still works on non-thread safe.