imggencoords: new function to create image coordinates

Create all coordinates in an m by n image for a given patch size
and a given tiling between patches
imgallpatches: use imggencoords