Added test checking substitutions on StringPlug default values.
Added Context::hasSubstitutions() method.

This can be used to query if a string contains any substitutions supported by Context::substitute().
Optimised StringPlug::getValue() and StringPlug::hash().

They now check to see if a string contains substitutions before actually performing the substitution - since most strings don't this results in a nice little speedup because we avoid allocating another string. The reduction in total runtime for the 20 frame animation test is around 9%. A little bit of further testing suggested that we may be able to eke out another 1% or so if we stored the result of hasSubstitutions along with the string in the plug's internal IECore::ObjectPtr value. Since this would require custom datatypes I decided for now that the extra complexity wasn't worth the small return - if we see hasSubstitutions() appearing as a significant factor in profiles then we can reconsider that decision.
Merge pull request #667 from johnhaddon/stringSubstitutionOptimisation

String substitution optimisation.
Implements an optimisation for StringPlugs that uses a faster code path when a string contains no variable references, giving a 9% reduction in runtime for John's animation playback test case.