net: add library loader refcount support

Change-Id: I38f066ba66c09147ab1f54d7069bfe517132872d