Export config checksumming functions for testing

(cherry picked from commit 985b1f271cd7210955b7cee02311bf0b499048ba)
Delimit functions in a sane way

(cherry picked from commit 4a4f583abafd8e9d72eb65c1220a51a9d7b0dd29)
Extract loops over options to standalone functions

(cherry picked from commit e604ff204b41d0b36d3e6a8a375b5c0d67b7c290)
(cherry picked from commit bc8b07b6f78ea54e78f04f432da2b74c439dfe11)
Fix local_config host configuration reloading

`reload_local` (hence `reload_cluster` too) was not idempotent.
This was caused by lame implementation of stopping a module,
which left a placeholder in the database instead of properly cleaning
up after removing the last module for a given

(cherry picked from commit 745eb2f786483ce011fccff0f4d9c285dc0fe1a6)
(cherry picked from commit 31aeaa86cbf5feec64549abcc5411cdec5eb4509)
Add logging about node/cluster config reloads

(cherry picked from commit 45195c361c2ba659045a588aff8737a60669c553)
DRY when destructuring config tuples

(cherry picked from commit e39f7dec35810f97a7809afb869bf745fabd5d8e)
Fix whitespace

(cherry picked from commit b9c1a2a6a6d2785742a774cb008b09a117b3d4d9)
Extract find_modules_to_start, find_modules_to_change

(cherry picked from commit 9025dcc4357b19d9c739224b32e42ef7ba7eb732)
Switch to #compare_result{} record

(cherry picked from commit 01db9c58e88a671ef00442f9881aef08d00d93af)
Fix badmatch (variable name reuse)

(cherry picked from commit 48b09820a2092fb1678c0a2ef990b093b264b16a)
Refactor for simplicity

(cherry picked from commit 8acf730866e319da1a7d24a3f1fcbe38c4fe05e0)
Use CamelCase for variables

(cherry picked from commit 7f513a5c3dfc0d9f1ef63ffa65283eb3c7fbe110)
Cleanup initial option categorization

(cherry picked from commit 9f7989923697d2877cd3a800b999c0b2070ff531)
Reflow exports

(cherry picked from commit a31b6537d0610362ef4e97ee9c78b2fa3d543d0d)
Get rid of reload_local/cluster file parameter

This extra parameter could lead to a discrepancy between the config file
and the config actually found in server's memory.
How?
By reloading configuration from a patch different than the config path.
So the "supposed to be server config" file could contain some options,
but the cluster could actually work using a completely different set
of options from a different location.

Now, it's impossible to pass a file path to reload_local / reload_cluster.
These commands only make the server reload configuration from the
default location.

(cherry picked from commit 7fe91dd80018ff9763fbd2e5153f32a35555fc85)
Fix broken spec: ejaberd -> ejabberd

(cherry picked from commit 3fde55d184b5ade2d5164ad16f7e3cd7da30a656)
Remove unused exported function

This is not accessible from mongooseimctl
and not used anywhere in the code base.

(cherry picked from commit 3ec6362074ddc0a716011e60298ec9a5ea801f55)
Tweak error formatting

(cherry picked from commit e5c613ade7a15ce142cd0eb0d37a52c56f333c2c)
Reformat group_host_changes

(cherry picked from commit 50f46fe6371f33337b11a702aaee3c54e937cf78)
Coalesce multiple local_config options into one

(cherry picked from commit 8090997684170f5daca09876f023556d385ade45)