Do not expand matrices on unwanted keys

In `#expand_config`, drop the keys that are superfluous.
This prevents creation of Job objects that contain extra config values
when they are unnecessary (e.g., when both `:ruby` and `:python` keys
are present).
Refactor messy boolean logic
Merge pull request #313 from travis-ci/ha-feature-multi_os_support

Do not expand matrices on unwanted keys