add an operator bool() to unit_map::iterator

Semantically equivalent to `unit_map::iterator::valid()`
Uses safe bool idiom when c++11 is not enabled