Synchronization improvements and bug fixes.

- Changed the state view on the child
- Contract is now pushed as soon as it is created so that we can access it for sending a mailing to the sponsor from GP.
- Contract is updated when it is validated (to know when will be the first payment).
- Added various security checks to avoid synchronization errors
- Contract are update also when a group is modified
- Code refactoring