Move list() condition into assign_znode

The condition in compile_foreach was using ->attr instead of ->kind
and as such never passed. It only worked because assign_znode already
supported this case by indirecting via zend_compile_assign. Now it
implements it with a direct call.
Test use($this) being an error
Remove dead code
Fix counting of "R:" references in serialize()