The prior attempt to resolve#420 and #431 relied on `appdirs` to
determine the appropriate directories into which to install files.
Previously, `setup.py` dynamically attempted to install `appdirs` via
`pip` during installation if necessary.
This attempt to failed on multiple platforms, however, due to
backwards-incompatible `pip` interfaces.
As a workaround, I have now directly included `appdirs` (a small module)
within `cheat` itself. This approach is explicitly supported per the
`appdirs` documentation:
https://pypi.org/project/appdirs/
Performed a general refactoring, focusing on the following:
- Removing layers of abstraction in config handling
- Stubbing out proper config validator
- Updating envvar names located throughout the project
PR #391 changed the locaton into which system-wide cheatsheets are
installed to `/usr/share/cheat`, in order to comply with FHS. However,
this is causing conflicts with the `snap` packaging process.
This commit removes hard-coded references to `/usr/share/cheat` (outside
of `config/cheat`), and instead reads the cheat path via the
`CHEAT_PATH` config value (which may be set either in `cheat/config`, or
exported as an environment variable).
Lastly, this commit makes `setup.py` "aware of" the `CHEAT_PATH` env
var, allowing us to specify to where sytem-wide cheatsheets should be
installed during the `snap` build.