Yaocho APIs

This adds a few APIs that were useful for Yaocho. These need to get to prod before I can put Yaocho in the marketplace.

r?
Gah. My old linter yelled at me for this stuff, so I've stopped being vigilant about it. I should make my new editor linter do that too.