Re-factored cli options merging with the config into it's own mix-in. Refs #2563.

This will be useful in `salt-cloud` which copied this functionality over.