Pull a simple parser function out of _mesa_get_uniform_location.
Rename uniform_field_visitor to reflect a more general purpose.

There's actually nothing uniform-specific in uniform_field_visitor.
This patch renames it to variable_field_visitor, and changes several
of the comments used within it, to clarify that it can be used for
other purposes as well.

A future patch in this series will start using variable_field_visitor
to enumerate fields within varyings.