Proposal for Daemon Script API

I've decided to abstract the OS-specific logic into an API, so that it's easier to write daemon scripts for other platforms, and to make edits to daemon script generation without performing surgery on the entire codebase.

Let me know what you think: @mmalecki, @rmg, @seanewest.