"original" stdout can even miss an encoding attribute.

If run "externally" then sys.stdout could be a StringIO for instance,
and have not an encoding attribute.

safe_print: enh: If UnicodeError problem on write then still fallback on 'ascii' as last possibility.

also use getdefaultencoding for guess encoding.
missed mock for jenkins requirements.
Enh: make Scheduler a newstyle class.

- To be consistant.
- Used for test debug:
  dynamicaly changed the "action" attribute to a property so
  to trace its usage from the tests.
clean tests: imports of test/shinken_modules.py
Allow to give REGEXPCMD as 6th arg of new_runtest.
Try travis with stdout buffered.

Still need process-restartworker and processes.
because of too much memory usage by the tests.
.. and process-timeout too
Workaround: for livestatus test: it badly import things imported here, instead of importing them directly.
Workaround : livestatus import datetime from here instead of directly.
Workaround : livestatus "sub-"import time_hacker from here instead of directly.
Workaround : livestatus "sub-"import sys from here instead of directly.
to see..
mille milliards de mille sabords