Joplin supports creating multiple profiles. This functionality was
previously missing from the joplin-desktop module and is implemented
in this PR.
In order to support profiles, the structure of the defined options had
to be split up into "global" settings that are shared between profiles
and profile-specific settings. This is a breaking change, but
necessary to avoid confusion about the difference between global and
profile-specific settings.
In addition to profiles, a few new options (such as markdown settings)
have been added.
This PR fixes two issues that cause rebuild to fail, see #5222.
The first was caused when sync.target and sync.interval were not set,
this was fixed by changing the default values from null to "undefined"
and filtering these out later.
The second error occurred when the .config/joplin-desktop directory
didn't exist (e.g. when installing Joplin for the first time) which
caused the touch command to fail. This was fixed using mkdir to ensure
that .config/joplin-desktop exists.