NOJIRA Now fully support interstitial type restrictions for metadata elements in installer.

Before it was assumed that in <type>foo</type> "foo" always referred to
a list item but with interstitial relationships it can be a
relationshipe type too now. This means that 1) there had to be a couple
of additions to the type restriction processing code and 2) we have to
process relationship types before we process metadata elements so that
the referenced types actually exist.