DEV: Refactor user_badge `select_for_grouping` scope (PR #13334)

This makes an easier path forward for adding more boolean fields without breaking something. Also an easier path if plugins want to add a boolean column.

GitHub