Tighten up const folding and code generation for texture calls.

There were serveral additional cases where optional params passed to the
texture routines were merely redundantly setting the default values, so
we want to avoid extra processing or instructions in those cases.
Use macros to remove redundant error-prone code.