Implement first part of editing domain preferences.

Show form accordig to preference type. Still doesn't save
correctly and lacks support for max_occur=0 cases (e.g.
lists of strings).