Improved performance of the StatefulTargetRepository:

- When lots of artifacts are present, changing one of those would cause *all*
  targets to update its state, even if the target had no association whatsoever
  with the originating artifact, this causes a lots of overhead and loss of
  performance;
- made the event-handling for the stateful target repository a little more smarter
  in its decision to recalculate the state of a (stateful) target. This is now
  only done when a target actually has something to do with the entity, for
  example, because it is reachable from the given target, or is a resource
  processor for an reachable artifact;
- improved the state calculation of a stateful target a little by storing the
  reachable artifacts and the artifacts of the latest deployment version in a
  sorted set. This way, we can use a single "equals()" check, instead of a
  double "containsAll()" check.



git-svn-id: https://svn.apache.org/repos/asf/ace/trunk@1574516 13f79535-47bb-0310-9956-ffa450edef68