ipdb: fix race invented with rwState()

Overcomplicated rwState() leaded nowhere but in the races. Simplify the
locking protocol of the interface class, fix races,  use more clean semantics
of the interface._direct_state.