internal/legacy: implement /charm endpoint

We use some of the tests from the old server.