[refactor] getOrMkRootWithCorpus with custom datatype

This was (User, Either CorpusName, [CorpusId]) before, but the case of
UserMaster doesn't make sense with these parameters, so I rewrote the
function to accept only correct datatypes as inputs.
parent ac11395a
Pipeline #5813 passed with stages
in 156 minutes and 26 seconds