Fix main loop exit.
Fix main loop exit.

Change-Id: I78a1ca7c1f038c54bd77427a5033c2147bc5fca5

aldebaran/libqi,aldebaran/libqi-java,bsautron/libqi,aldebaran/libqi,aldebaran/libqi,vbarbaresi/libqi,aldebaran/libqi-java,aldebaran/libqi-java