Get the id of an IMContext. This function should return -1 if it's not been registered to the agent.
Referenced by ScimBridgeClientIMContextImpl::reset().