cleanup and testing of NameValuePair collection