libsql exposes a WAL checkpoint callback that is called once for each
frame and right when checkpointing is about to finish.
before this change, the result code returned by the checkpoint callback
was ignored on the 'finish' invocation, which resulted in the checkpoint
completing successfully despite the callback returning an error.
this commit propagates the callback's error code and thus prevents the
wal_checkpoint() routine from returning SQLITE_OK in cases where the
callback failed.