librados: only call watch_flush if necessary

Fix bug #10424
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>

(cherry picked from commit 926a1b7468550e0c83bfa68bd45df1a6af599727)