gpu_array_ref_group: replace last_shared by depth
While last_shared was the index of the last dimension that affects
the tile, depth is the number of dimensions that affect the tile.
That is, the depth is one greater.
The depth is easier to work with, especially when we switch
to schedule trees as it reflects the depth where the copying
should be performed.
Note that it may be tempting to define the depth of a tile
rather than the depth of a group, but the only place where
the shared tile is used when a private tile is defined as well
for the same group is group_common_shared_memory_tile and
in that case we need the depth of the effective tile
(i.e., the private tile).
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>