Initial formal proposal for the AS API

I thought more about the requirements for application services over Christmas, and here's a slightly high-level but fairly concrete proposal of what I think they should look like.  This largely ignores policy servers and the Storage API idea, in favour of building on our current client-side gateway bots by giving them privileges and making them run as proper server-side services.

This hopefully decouples the AS API problem entirely from the CS v2 API discussion.