Add AutoDtor class to automatically call a custom deleter function on destruction

No, this was the result of copying AutoPtr and changing it. I'll remove it.