Changed accompany goal to use entity filter.

With this change, the goal can still be created focusing on
an entity with specified ID, but it now also supports wider
range of criteria.