Added pair-fn to transform both key and value

I have a requirement to transform both key and value at one time,so i added a pair-fn just like 
value-fn,but it will replace both key and value to output.Please check the commit and test case.Thanks.