y = halve_avg(mat)
halve_avg(mat) -- Generate a 1/2-scale version of this matrix. The resulting matrix will have dimension ceil(size/2). The decimating function simply averages pairs (quads) of elements when possible, and just returns the same value otherwise (e.g. when at the bounds of an odd-length matrix).