ReplicatedPG: replace backfill_pos with last_backfill_started

last_backfill_started reflects what pinfo.last_backfill will be
once all currently outstanding backfills complete.  backfill_pos
was tricky since we couldn't correctly inialize it without
doing the first backfill scan pair.

In recover_backfill, we rescan from last_backfill_started rather
than from backfill_pos.  This ensures that we capture all clones
created between last_backfill_started and what previously had been
backfill_pos without special handling in make_writeable.  The main
downside is that we will tend to "rescan" last_backfill_started.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 9ec35d5ccf6a86c380865c7fc96017a1f502560a)

Conflicts:
	src/osd/ReplicatedPG.cc
ReplicatedPG: recover_backfill: don't prematurely adjust last_backfill

We can't adjust last_backfill to object x until x has been fully
backfilled.  pending_backfill_updates contains all those backfills
started, but which have not yet been reflected in pinfo.last_update.
backfills_in_flight contains those backfills which have not yet
completed.  Thus, we can adjust last_update to the largest entry
in pending_backfill_updates not in backfills_in_flight.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 4139e75d63b0503dbb7fea8036044eda5e8b7cf1)

Note: this had already been partially backported to dumpling in
d4e67ff3037a3cc7ae2ecc9e1d8d086c45ae515a.  I'm replacing that
patch with an actual backport since
9ec35d5ccf6a86c380865c7fc96017a1f502560a
has been backported.

Conflicts:
	src/osd/ReplicatedPG.cc
ReplicatedPG::recover_backfill: update last_backfill to max() when backfill is complete

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 7a06a71e0f2023f66d003dfb0168f4fe51eaa058)
osd: Fix problems in ReplicatedPG::do_op() logic

Fix assert(is_degraded_object(soid)) in ReplicatedPG::wait_for_degraded_object()
  Use last_backfill_started as the backfill line
  Handle uncommon case of multi op source after backfill line and target before
  backfill line and !is_degraded_object().
  Include backfill line itself for before_backfill (<= instead of <)

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 7837490a9d5fc467a2cc25400f94979d8d4b4d8e)