Lots of work towards a full permissions system

Potentially unstable and requires more testing. This commit implements a
new section of the configuration for specifying permission nodes.
APICommand's permission checks have been revamped, all API commands have
been converted to the new node-based system, and a frontend permission
checker has been implemented.