CA-137879: Do not keep xenstore connection open.

This reduce the number of connection required.
xenstore is only needed at initialization and to write statefile.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Avoid to compute data at run time if not necessary.

consmap was mainly constant and was written only at initialization time
to sort it.
Make the sort at compile time. This save memory as constant memory is
resused by multiple processes in modern operating systems.