Restructured the code to hopefully make it cleaner.

- Moved initial packet sending to a Lua triggered function. This allows any access tokens to be managed by Lua.
- Most private data that scripts should not have access to have been moved to piepan.internal