[contract] reactivate the closed contract at the SO's confirmation

- Task: https://www.odoo.com/web?debug=#id=6527&view_type=form&model=project.task&action=327
- Pad: https://pad.odoo.com/p/r.hhgH3UWxNoWzXLBT
This change is only refactoring, please revert it to avoid noise in the diffs