Makes EntityDocument implement Comparable

Allows to compare EntityDocuments