Optimize destruct somewhat.

Avoid keeping track of if destroy() has been called for objects that
lack destroy().
Switch to new indexing API.
files -> _Stdio with minimal changes.