Fixed sha1 generation & sorting for profiles.

Profiles are now unique according to entity_id, event_type and
timestamp.

Fixed sorting for when event_type is the same, then it sorts by date.
Merge pull request #264 from MastodonC/feature/improved-profile-id

Fixed sha1 generation & sorting for profiles.