Enumerate labelcache

This changes how we deal with the label cache by flattening the result to a single array, only returning labels that were actually rendered, and using more optimal code for >= mapserver 6.5