Complete optimization first version

Intersection :
- Rewrite the countdown function
- Add the toGreen/toYellow/toRed/toTEMPRed functions to switch the
signal state
- Add the optimization related function