use a map to associate reply_id to CAPI callbacks

Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>