add extended axis and keepdims support to percentile and median