New rule execution system.

Now when an event comes to trigger rules the rules are not directly
checked and executed, but instead conditions are evaluated and if the
rule needs to be executed the execution is postponed after _all_ rules
are evaluated. This prevent a rule to completely change IO that coulb be
in other rules in the same execution cycle.

With that patch one can now do:

<calaos:rule ... >
  <calaos:condition type="standard" trigger="true">
    <calaos:input id="switch" oper="==" val="true" />
  </calaos:condition>
  <calaos:condition type="output" trigger="false">
    <calaos:output id="light" oper="==" val="false" />
  </calaos:condition>

  <calaos:action type="standard">
    <calaos:output id="light" val="true" />
  </calaos:action>
</calaos:rule>

<calaos:rule ... >
  <calaos:condition type="standard" trigger="true">
    <calaos:input id="switch" oper="==" val="true" />
  </calaos:condition>
  <calaos:condition type="output" trigger="false">
    <calaos:output id="light" oper="==" val="true" />
  </calaos:condition>

  <calaos:action type="standard">
    <calaos:output id="light" val="false" />
  </calaos:action>
</calaos:rule>

This was not possible before because the first rule would change the
"light" output before the evaluation of the second rule...

This needs to be tested in a lot of situation to see if there is no
drawbacks.
Setting a new value in dimmer disable all running impulse
debug++
Better logging for tcp function