config: reduce calls to findall.

This call is slow and is called many times which can seriously slow down
commands such as `cylc validate`. This change uses 2 str tests to see if
there is a any need to call the findall command at all.
Merge branch 'master' into replace_family_triggers.findall
cylc.config: further reduce unnecessary logic.
Merge branch 'master' into replace_family_triggers.findall
Merge branch 'master' into replace_family_triggers.findall
Merge branch 'master' into replace_family_triggers.findall
Merge pull request #340 from matthewrmshin/replace_family_triggers.findall

config: reduce calls to findall.