osd/ReplicatedPG: adjust avg_size calculation in agent_choose_mode

Refined the avg_size patch based on the change of adding num_bytes_hit_set_archive, and fixed a minor bug.

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>