issue #22244: refactor document associations

Not ready for pull yet

TODO: need a compound inverse in case of duplicate source key

resolves #1962.
I'm not suggesting that we change anything already extant. I _am_ suggesting that we describe what we have and provide guidelines for the future. Any extension could come along and choose to add new document associations; we should pre-emptively minimize disruption.