This commit adds `getConstant()` and `setConstant()` methods to
`MaterialInstance`.
When a material instance is created, it doesn't create or manage any spec
constants on its own, but instead relies on `Material`. The client can change
constants at any time, after which the necessary resources are copied and
maintained by `MaterialInstance`.
As part of this change, most internal rendering methods which depended on
`Material` have been refactored to instead depend on `MaterialInstance`.