some cleanups for TSRMLS_FETCH and direct tsrm_ls usage in main