Better rendering of api.

- Add safe-ids to api
- Add textual version of arglists and signatures in api
- Only sanitize api before saving to yaml.