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).