Improved svc.SetCharm and unit.SetCharmURL, added more tests
Merge pull request #1129 from dimitern/lp-1301996-backport-for-1.21

Improved svc.SetCharm and unit.SetCharmURL, added more tests

This is an attempt to fix issues like http://pad.lv/1301996

Backported #1113 to 1.21, no other changes.