JSON backend for user preferences

(see commit messages)