glsl/linker: Subdivide the first phase of varying assignment.

This patch further subdivides the loop that assigns varying locations
into two phases: one phase to match up the varyings between shader
stages, and one phase to assign them varying locations.

In between the two phases the matched varyings are stored in a new
data structure called varying_matches.  This will free us to be able
to assign varying locations in any order, which will pave the way for
packing varyings.

Note that the new store_locations() function outputs three variables
that are not used yet; these will be used in a future patch.
glsl/linker: Sort varyings by packing class, then vector size.

This patch paves the way for varying packing by adding a sorting step
before varying assignment, which sorts the varyings into an order that
increases the likelihood of being able to find an efficient packing.

First, varyings are sorted into "packing classes" by considering
attributes that can't be mixed during varying packing--at the moment
this includes base type (float/int/uint/bool) and interpolation mode
(smooth/noperspective/flat/centroid), though later we will hopefully
be able to relax some of these restrictions.  The number of packing
classes places an upper limit on the amount of space that must be
wasted by varying packing, since in theory a shader might nave 4n+1
components worth of varyings in each of m categories, resulting in 3m
components worth of wasted space.

Then, within each packing class, varyings are sorted by vector size,
with vec4's coming first, then vec2's, then scalars, and then finally
vec3's.  The motivation for this order is that it allows all
power-of-two sized varyings to be located at multiples of their
natural alignment (vec4's located on vec4 boundaries, vec2's located
on vec2 boundaries) without wasting space.  Once the vec4's, vec2's,
and scalars have been placed, the vec3's may be either be aligned to
vec4 boundaries (resulting in a wost-case 33% waste of space) or
aligned to scalar boundaries (resulting in some performance loss).

Note that the varyings aren't actually packed yet, merely placed in an
order that will facilitate packing to be introduced by a later patch.
glsl: Create a field to store fractional varying locations.

Currently, the location of each varying is recorded in ir_variable as
a multiple of the size of a vec4.  In order to pack varyings, we need
to be able to record, e.g. that a vec2 is stored in the second half of
a varying slot rather than the first half.

This patch introduces a field ir_variable::location_frac, which
represents the offset within a vec4 where a varying's value is stored.
Varyings that are not subject to packing will always have a
location_frac value of zero.
glsl/linker: Account for packing when storing varying locations.

This patch further paves the way for varying packing by updating the
code that stores varying locations in ir_variable data structures.
Add lower_packed_varyings
Whoops, forgot to store into num_slots_used.
Don't try to pack fixed functionality stuff
Use lower_packed_varyings
glsl/linker: Pack varyings.
Debugging
glsl/linker: Handle packed transform feedback varyings.

This patch modifies the linking of transform feedback varyings to
account for the fact that varyings are now packed.