Introduce ConstantSpec::get_value.

I'll need it for cross-origin wrappers as well.
Merge pull request #3177 from Ms2ger/ConstantSpec

Introduce ConstantSpec::get_value; r=jdm