libintegrity: initialize gthreads in check_and_repair_content2

Change-Id: Id70627d516f970308f94f870b23ce418b8517d27
Merge "libintegrity: initialize gthreads in check_and_repair_content2"
Remote API reviewed.

We now provide a new set of API with a uniform style.
The main benefit is now to handle session ID's in all RPC.
These session identifiers are already handled by the redcurrant daemons, and propagating a single session id in all the requests belonging to a single session really helps to consolidate the logs.

Change-Id: Iec8969fed2f1280822d92d1575ccf7e15b46cd42