Fix OOIION-1111: Extended resource framework association direction

This fix allows to specify the association direction in extended resource framework decorators. This is important when a resource type uses the same predicate for incoming and outgoing associations, e.g. sites that are recursively nested.

Example:
  #@hasSite<
  parent_site: !Site      # The immediate parent of this site (if any)

  #@hasSite>
  child_sites: []

  #@hasSite>=InstrumentSite
  child_instrument_sites: []

Extensive tests were added.