internal/legacy: implement /charm endpoint

We use some of the tests from the old server.

Thanks for this comment, interesting.