Configuration rewrite, part 1

Switch from ini config to JSON, ditch most command-line parameters.
To preserve testability for now, retain current weird internal representation.

Change-Id: I54058836e19c94c5ab6b46b37bd43df3652411a5