RDS IB caches code leaks memory & it have been there from the
inception of cache code but we didn't noticed them since caches
are not teardown in normal operation paths. But now to support
features like variable fragment or connection destroy for ACL,
caches needs to be destroyed and rebuild if needed.
While freeing the caches is just fine, leaking memory while
doing that is bug and needs to be addressed. Thanks to Wengang
for spotting this stone age leak. Also the cache rebuild needs
to be done only when desired so patch optimises that part as
well.
Tested-by: Michael Nowak <michael.nowak@oracle.com> Tested-by: Maria Rodriguez <maria.r.rodriguez@oracle.com> Tested-by: Hong Liu <hong.x.liu@oracle.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>