rainx: fix multithreading

Code is still ugly, but works in multithreaded apache.
Better handling of rawx errors.

Change-Id: Iaad662004ad9bd7f227d5120f9de261117d5179a
rainx: fix cpu leak in rawx stat system

Thanks to Rémi's work on rawx.

Change-Id: Ibce0fd1a106864a2d3ed6ba03655cdbbf1be3b23
Merge changes Ibce0fd1a,Iaad66200

* changes:
  rainx: fix cpu leak in rawx stat system
  rainx: fix multithreading