Add bulletproofing around the management of config->rk and config->rkt

Add bulletproofing around the management of config->rk and config->rkt kafka handles.

Avoid dereferencing or freeing null handles for Consumer and Producer classes.

JIRA: PART-3886