make an observe-sequence test fail
fix observe-sequence when cursor is invalidated

observe-sequence would miss callbacks if database changed while cursor was invalidated.

Added a private API to cursor.observe handle to get a snapshot of the OrderedDict