Fix api_swhid_known when swhids share hash part
Bug: https://forge.softwareheritage.org/T4224
We need to have separate sets for each type of object.
I have some other cleanups in minds, but this can fix the bug without
touching other repos for now.