osd: improve backfill prioritization

- fix a minor encoding bug
- make the backfill priority have more levels, and base it on how
  many replicas are missing