Few tiny changes to valid() in checked_iterator
Added implementation of monitor<T> to synchronize operations on a type