matrix = (w, h, filler) => {
  return new Array(h)
    .fill(null)
    .map(() => {
      return new Array(w).fill(filler);
    });
}
Helper function that creates a matrix (2D array) of specific
size (w x h) and fills it with specified value.
@param {number} w
@param {number} h
@param {?(number | SeamPixelMeta)} filler
@returns {?(number | SeamPixelMeta)[][]}