Invoice generation and validation commits.

The invoice generation and validation does now commit the changes
in order to avoid restarting the whole process if an error occurs
during the execution.

- Generation : commit the invoices each time a contract_group is done.
- Validation : commit each generated invoice.

The process is also logged into the console so that we can keep an
eye at the execution and know when it is performing or not.