sort secrets and configs to ensure idempotence
sort secrets and configs to ensure idempotence

`docker stack deploy` keeps restarting services it doesn't need to (no changes)
because the entries' order gets randomized at some previous (de)serialization.
Maybe it would be worth looking into this at a higher level and ensure
all (de)serialization happens in an ordered collection.

This quick fix sorts secrets and configs (in place, mutably) which ensures the
same order for each run.

Based on
https://github.com/moby/moby/pull/30506

Fixes
https://github.com/moby/moby/issues/34746

Signed-off-by: Peter Nagy <55681eab1f0aba8cc9f3777269b2b13cf62b2c44@gmail.com>

Zebrilee/cli,dnephin/cli,redpanda/cli,docker/cli,dnephin/cli,docker/cli,redpanda/cli,allencloud/cli,cpuguy83/cli,thaJeztah/cli,Zebrilee/cli,ashfall/cli,ashfall/cli,thaJeztah/cli,cpuguy83/cli,allencloud/cli