MT#7347 added reference counting to plug-in interfaces.

ported patch from 1.4-ha-sw branch of sems-ha.