Fix # handling in SimpleConfigFile (#1045687)
It was treating anything after a # as a comment, even if it appeared
inside a quoted string. This fixes it to find the last # outside a
(optional) quoted string and adds several tests.
This also adds back the non-IfcfgFile tests for SimpleConfigFile from
old_tests