MIME DB build: Fix name clashes

* Make grist for subtype source files unique.
* Our MakeLocate only appends to LOCATE, so we have to call it before
  ResComp, if we want a different location.
MakeLocate rule: Avoid directory dependency, if already located

Only create the directory dependency for a target, if that's where the
target will actually end up. If it has already been located before, do
nothing.