check to_remove before setting transaction

currently if you dump transaction for a single rbd write, a transaction
of OMAP_RMKEYS will be listed even if to_remove is empty.

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
Merge pull request #2805 from xinxinsh/wip-check-trimmed-pg-log

check to_remove before setting transaction

Reviewed-by: Sage Weil <sage@redhat.com>