Write a function that measures the performance of other functions.
Implement measure_performance(function_name, args, iterations, clock_values) and return the final result, elapsed time, average time, and iteration count. For deterministic tests, clock_values contains the start and end timestamps; supported function names are add, square, and constant_none.
def measure_performance(function_name, args, iterations, clock_values):