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?
We have this logic elsewhere in kitsune right? or does it come from a lib? No way to refactor/reuse?