Revamp packaging to achieve more correct Lua style
Several changes regarding packaging, namespacing and handler API:
* Utility function module is now called 'imapdomo', not 'common'.
* The module behaves as one, instead of being just a global-modifying
include.
* Lots of cleanups as advised by luacheck (local declarations,
removal of unused variables...)
* Handlers now have to access utility API via `require` and provide
accout configuration in new file mailboxes.lua, which has to return
table. Accessing mailboxes is via utility function. (This sounds
complicated but actually is not. Believe me! :))
Where regular expression is read from a variable and -e argument is not
provided, the resulting call may end up being interpreted as grep
argument.
See also:
https://github.com/koalaman/shellcheck/issues/1342
Action won't start if one is already running. This should prevent
overlapping actions.
It's possible to turn off locking to allow running imapdomo as service,
ie. locking will be taken care of by init system.
Having just 4 valid actions (albeit they do form a meaningful workflow)
was rather historical limitation caused by author's negligence.
User should be able to define any actions they want by simply creating
handlers for them.
Later we might want to provide a guidance (template) for that, but
that's a TODO item.