Optimized Shader::setParameter functions, by using a cache internally (#316, #358)