Fix install_packages_defined_in_command_line

Add 'defaults' section in config file to replace 'active_compiler_set'.
Fix conflict packages
Fix errors

There are still some minor logic errors, I will fix them in the following commits.
Small changes
Forget to reinstance package

When specifying packages in command line, the user inputs may change the
dependencies of packages. So I have reloaded the package definition
file, but forget to reinstance the package to make changes effective.
Fix a logic error
Move require of 'pty' and 'expect'
Fix patch bugs