Make directory iterator sentinels free.

This trades some complexity in operator== for not introducing static objects
into any functions using recursive directory iterators.