light-set: Don't reference layers that aren't in the material

Cogl has changed so that it no longer uses the builtin GLSL variables
for the texture coordinate varyings and attributes. This breaks Mash
because it was previously hard-coding the use of a single texture
attribute and varying. However if the material has no layers then this
attribute and varying will no longer exist. To work around the problem
this patch makes it look at the layer indices whenever it generates a
program and only generate the code for those layers.

This is a bit of a hack. A better solution would be to convert the
code to use CoglSnippets instead of the deprecated CoglPrograms.