Bug fix & cleanup in config code.
Bug fix & cleanup in config code.

python/m5/config.py:
    Bug fix: code was silently converting between
    incompatible SimObject types as an unintended
    side-effect of the object cloning support.

--HG--
extra : convert_revision : 236f4fe5370f2eddf8af8fab68e2b83dccc34305

joerocklin/gem5,powerjg/gem5-ci-test,SanchayanMaity/gem5,Weil0ng/gem5,austinharris/gem5-riscv,briancoutinho0905/2dsampling,powerjg/gem5-ci-test,KuroeKurose/gem5,sobercoder/gem5,joerocklin/gem5,qizenguf/MLC-STT,sobercoder/gem5,gedare/gem5,gem5/gem5,samueldotj/TeeRISC-Simulator,qizenguf/MLC-STT,samueldotj/TeeRISC-Simulator,powerjg/gem5-ci-test,markoshorro/gem5,aclifton/cpeg853-gem5,gem5/gem5,austinharris/gem5-riscv,Weil0ng/gem5,rjschof/gem5,yb-kim/gemV,aclifton/cpeg853-gem5,yb-kim/gemV,markoshorro/gem5,TUD-OS/gem5-dtu,kaiyuanl/gem5,gedare/gem5,joerocklin/gem5,sobercoder/gem5,markoshorro/gem5,markoshorro/gem5,kaiyuanl/gem5,gedare/gem5,yb-kim/gemV,powerjg/gem5-ci-test,Weil0ng/gem5,rjschof/gem5,sobercoder/gem5,joerocklin/gem5,aclifton/cpeg853-gem5,gem5/gem5,rallylee/gem5,rjschof/gem5,aclifton/cpeg853-gem5,kaiyuanl/gem5,cancro7/gem5,qizenguf/MLC-STT,markoshorro/gem5,austinharris/gem5-riscv,KuroeKurose/gem5,qizenguf/MLC-STT,briancoutinho0905/2dsampling,HwisooSo/gemV-update,SanchayanMaity/gem5,briancoutinho0905/2dsampling,sobercoder/gem5,sobercoder/gem5,TUD-OS/gem5-dtu,aclifton/cpeg853-gem5,yb-kim/gemV,HwisooSo/gemV-update,samueldotj/TeeRISC-Simulator,samueldotj/TeeRISC-Simulator,yb-kim/gemV,powerjg/gem5-ci-test,aclifton/cpeg853-gem5,briancoutinho0905/2dsampling,kaiyuanl/gem5,KuroeKurose/gem5,gem5/gem5,zlfben/gem5,austinharris/gem5-riscv,HwisooSo/gemV-update,gem5/gem5,qizenguf/MLC-STT,cancro7/gem5,zlfben/gem5,gedare/gem5,SanchayanMaity/gem5,KuroeKurose/gem5,rjschof/gem5,yb-kim/gemV,rjschof/gem5,gedare/gem5,markoshorro/gem5,HwisooSo/gemV-update,cancro7/gem5,KuroeKurose/gem5,SanchayanMaity/gem5,Weil0ng/gem5,Weil0ng/gem5,powerjg/gem5-ci-test,sobercoder/gem5,joerocklin/gem5,KuroeKurose/gem5,rallylee/gem5,TUD-OS/gem5-dtu,SanchayanMaity/gem5,zlfben/gem5,rallylee/gem5,rjschof/gem5,HwisooSo/gemV-update,samueldotj/TeeRISC-Simulator,Weil0ng/gem5,SanchayanMaity/gem5,powerjg/gem5-ci-test,cancro7/gem5,TUD-OS/gem5-dtu,austinharris/gem5-riscv,gem5/gem5,qizenguf/MLC-STT,joerocklin/gem5,samueldotj/TeeRISC-Simulator,austinharris/gem5-riscv,joerocklin/gem5,zlfben/gem5,zlfben/gem5,qizenguf/MLC-STT,yb-kim/gemV,kaiyuanl/gem5,briancoutinho0905/2dsampling,KuroeKurose/gem5,markoshorro/gem5,TUD-OS/gem5-dtu,SanchayanMaity/gem5,gedare/gem5,aclifton/cpeg853-gem5,rjschof/gem5,zlfben/gem5,gedare/gem5,zlfben/gem5,kaiyuanl/gem5,cancro7/gem5,kaiyuanl/gem5,Weil0ng/gem5,cancro7/gem5,HwisooSo/gemV-update,briancoutinho0905/2dsampling,samueldotj/TeeRISC-Simulator,rallylee/gem5,rallylee/gem5,rallylee/gem5,cancro7/gem5,rallylee/gem5,gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,yb-kim/gemV,briancoutinho0905/2dsampling,joerocklin/gem5,austinharris/gem5-riscv,HwisooSo/gemV-update