group accounts under the hood

We need to axes of grouping: whether an account can be used for signing in or not, and how to group accounts for the Connected Accounts UI. This is a simplistic implementation of this grouping in the wireup module. It builds on #2121 (review/merge that first), and sets us up for a next PR to implement the UI changes to Connected Accounts (to be calved off from #2053).