Rework CHARM_CONFIG into a function for ease of testing, add tests for subordinate charm deployment