Php 1093 refactor cursor logic

Sortof, the ptr_dtor is recursive, and hence would already have freed indexes, and index_spec