Major changes of command processing for sessiond
This follows up a TODO added at commit
5e16da05 by me and Mathieu
Desnoyers about the command processing using a command context.
This patch introduce a command context data structure which contains all
the necessary information to process a command received by the session
daemon from the lttng client.
The entire session daemon is refactored with this addition. All
userspace trace action also. The global current_session pointer is
removed and is now in the command context struct. Some of the functions
for the buffer allocation are removed/changed.
This is the first step of getting the session daemon multi-threaded.
This patch also fix the -h bug of the lttng client introduce in the
commit
5e16da05. Minor variable renaming also occured.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>