Add UDFs for weighted sampling of a bag and counting elements of a bag

This commit includes two udfs with corresponding tests.
*WeightedSample: This UDF will produce a weighted sampling (reordering) of a bag using either positional order or a scoring column
*CountEach: The UDF counts the number of times that a tuple occurs in a bag.