[Storage] SchemaDB: iterator implementation should check status
[Storage] SchemaDB: iterator implementation should check status

When the internal iterator is invalid, it could be that it reached the
end of the data, but it could also be that there is an error. So we
should always check status.

With the change it might be possible that the iterator generates errors
indefinitely, so we probably should audit the callers to see if they are
doing the right thing...

Closes: #2248
Approved by: davidiw

aptos-labs/aptos-core,aptos-labs/aptos-core,libra/libra,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,libra/libra,libra/libra,libra/libra,libra/libra,aptos-labs/aptos-core