Added some tests for equal elements in min_element and max_element. Bug #19547 was invalid, but we weren't testing that case