Add wp_client_get_permission_manager() and
wp_permission_manager_get_default_permissions() and expose both as Lua
methods. This allows Lua scripts to verify a client's trust level at
runtime by inspecting the actual permission bits of its attached PM.
I had a hard time figuring out all the steps relevant for this to work.
Hopefully this brief summary and couple of links will help the next
person writing their own script.
See: #601
Also:
- rename some files to remove redundant information from the filenames
- rename many labels to match the filename and its place in the hierarchy
- move lua_api under the scripting section