appserver: store service data as JSON, not flat files

This is cleaner, safer, and allows swissnums to contain filesystem
characters (like the slashes that git-foolscap uses) without problems.

Old-format flat-file directories (with files named
BASEDIR/services/SWISSNUM/service_type and ../service_args) are still
handled, but will be upgraded (by writing out a new "services.json"
file) when a new service is added.

Closes ticket:226