Sort hash keys in saved configuration for reproducibility

Bug-Debian: https://bugs.debian.org/763677

Having stable saved configuration helps the recent efforts
for reproducible builds, see https://wiki.debian.org/ReproducibleBuilds
Release 0.402