r=johann,adilger - fixes resent rpcs for those sent by set and also fixes log_cancel resent handling; - cleanups.