clear_status_flags_on_sybil might want to clear more flags

clear_status_flags_on_sybil contains a comment saying "it's easy to add a new flag but forget to add it to this clause."

It looks like we may have forgot the following flags:

  • is_hs_dir
  • version_known?
  • version_supports_extend2_cells?
  • has_bandwidth
  • has_exitsummary?
  • bw_is_unmeasured? (set to 1?)
  • bandwidth_kb
  • has_guardfraction
  • guardfraction_percentage

To deal with the root cause, should we instead zero out the entire routerstatus_t, then copy the fields we need back in? (This would zero new fields on sybils by default.)

We could also implement a unit test for clear_status_flags_on_sybil that checks that certain (important?) flags are cleared, or that all flags are cleared (?).