Fix session handlers in zts

Also use ZEND_HASH_FOREACH API.