- Documentation: Document include guard convention
- Fix: Fix missing or inconsistent include guards
- Regression test: Add an arcanist linter which checks include guard
consistency
Backport of core PR12757 (commits 8fd6af8 and 8af65d9)
https://github.com/bitcoin/bitcoin/pull/12757/commits/8fd6af89a0c061d79bb3fd2ba704b61dcc2e9211
https://github.com/bitcoin/bitcoin/pull/12757/commits/8af65d96f4166cb57ff567a4c937f81c8e5a8aeb
The third commit (linter) is adapted as an arcanist linter.