tableMin and tableMax

added tableMin() and tableMax() functions to return the min/max element
and key for element from a table of values