Fix/Enh: LiveStatus: performance enhancement + various clean/simplification/fix.
Clean/Fix/Simplification: various clean + logs added + DRY
livestatus: better get_live_date_log().
LiveStatus_broker: try to force release memory.
LiveStatusLogSToreSqlite: add a generator version of execute for select,
LiveStatusResponse: use a namedtuple for separators.
LiveStatusWaitQuery: clean __init__.
Added a "LiveStatusListResponse" to help memory usage with very long response.
Fix: most probably a typo due to an auto-completion.
Clean/Enh: logstore_sqlite module.
- Use LiveStatusLogStoreSqlite.select().
- changed get_live_data_log to a generator.
- changed select_live_data_log to a generator.
- simplified where possible.
- clean for some logs.
Clean: give some logs when abnormal things/shit happen.
clean: livestatus_response: simplifications.
LiveStatusResponse: reduce continuous size required + add a clean method on LiveStatusListResponse.
Also: json or python: don't like the _compact.
livestatus_broker: be DRY + correct/better handling of closing cient connection.
Again a DRY/facto. + log warning on shutdow failed.
Added some comments.
UTF8 declaration line must be on second line.
LS_Query: Put generators out of method def. For reuse.
LS_Query: get_live_data_log(): also limits number of results sent.
Fix: tuple missed..
[LS] Add: a livestatus_client_thread module and class to handle client connections.
LiveStatusResponse: factorized a lot between csv, json and python format outputs + made a generator.

We must iterate over the plain list indices instead of on the values.
Fix: json must have ',' separating each result row.
Fix: json/python: row_handler: must separate rows by coma.
livestatus_response: warning comes too often. it just spam logs.
logstore_sqlite: don't automatically create table + big performance improvment.

Better select : yields list of rows per list of rows instead of row per row.
livestatus_broker: begin use new ClientThread + improvments.

+ use a dedicated threads to listen to new client connections.
  So that the main thread does not have to poll continously between such new connections and new broks.
    -> no more (such) busy loop.
test_livestatus: Adaptations for reworked LiveStatus.

changed many assert_(x==y) to assertEquals(x, y) for easier debug.
livestatus tests: need to eventually flatten the response.
Fix. compared one byte too mutch.
factorize mock_livestatus_broker_handle_request
Fix: None dereference. (+ x == None -> x is None)
livestatus: slightly better tests: better mock.
LS tests: fix test_livestatus_db
Enh: For easier dev, tests, debug : allow to directly execute shinken in "dev" mode.

By dev mode I mean :
To be able to clone the repository as a non-privileged user in any directory,
and then to directly execute the daemons or the tests.
This without nearly any other step required,
it depends if you have the dependencies available or not.

The daemons will use the "var" directory as working directory.

The less dependencies/requirements you have for doing anything : the better.
livestatus counters: clean + share livestatus.counters + use lock.
LiveStatus tests: Skip cache tests for now.