Various fixes

- Add autoload cookies for interactive entry point functions
- Fix checkdoc warnings
- Use locate-dominating-file instead of hand-rolled lookalike