Cache custom uniform's values to avoid setting them redundantly

Optimization is applied only to uniforms whose value is of type number in
JS. Extending this to vector and matrix uniforms would be possible, but
the returns are smaller.
Merge pull request #305 from NVIDIA/custom-uniform-optimization

Cache custom uniforms values to avoid setting them redundantly