Numerous functions added to c libs, add in start of libnvpair, cleanup