Only return same relationship once.

If providing the same RelationshipType more than once to the
getRelationships() method of Node, one would get relationships of that
type more than once. This change deduplicates the types, ensuring that
each relationship is returned no more than once.

This fixes #1477.
Merge pull request #1563 from thobe/2.0-deduplicate-reltypes

Only return same relationship once.