Split Entity class, add state tracking, refs T696

Summary:
- make Entity into an interface
- add StatefulData trait, tracking state changes
- split between StaticEntity and DynamicEntity
- update all entities to new code
- fix errors in repos exposed by new code

Test Plan:
```
bin/behat -c application/tests/behat.yml -f progress
```

Reviewers: aMoniker, vladimir, rjmackay

Subscribers: eyedol, dkobia

Maniphest Tasks: T696

Differential Revision: https://phabricator.ushahidi.com/D536