the ecu has no control over the fan, the CF pin is "input" from the sensor. The single wire fan switch controls the fan relay itself, a wire is joined from the relay input and goes to CF pin to the ECU. It doesnt actually matter much.
The backwards relay requires another normal relay to supply the power otherwise the fan will run even with the ignition switch off (as the relay will switch off and supply power to the fan) - Toyota has provided a main relay in their fuse box which feeds the fan relay - it is directly controlled by the ignition switch.
The fan wiring is very simple if you have a 1 speed fan setup (1 fan relay) one wire from the fan is ground (earth), the other is positive which goes to the relay output (bridge) one side of the bridge and coil share the same switched 12V +ve from the main relay. The remaining 1 wire goes to the fan switch on the engine.
With factory A/C and dual speed fans the wire is intercepted at the high pressure switch too. In that car there are 3 fan relays. The system is very nicely setup by toyota, when you switch on the A/C the fans run in series (slow) - when either engine temperature or high pressure switch for A/C opens up the fans go parallel (full speed)