This allows require() and import to work for even better compatibility between CJS and ESM consumers.
I dislike that this kills our ability for top-level awaits in example.ts, but seeing as how my primary use case for this library is a commonjs module, I think this is a fair trade-off.
Also changed "messages" to not encapsulate its export under the name "messages" to remove some repetition in importing "messages" and still needing to do "messages." to get the methods out. Now it's simple to import each message by name or group them under something like "messages" as desired on a per-library-user basis.
Refs:
* https://www.kravchyk.com/typescript-npm-package-json-exports/
* https://arethetypeswrong.github.io/
* https://evertpot.com/universal-commonjs-esm-typescript-packages/
Using SubscribeToUpdates() will cause the Unit to trigger a "notify" event any time the subscribed property changes, containing the new value of the property.
I don't know how/if you can unsubscribe from something as I don't see the official app ever doing that.
This adds a bunch of messages to retrieve and set various things on the controller. It also groups the messages under one export to simplify the process of using and discovering many of them from one location.
Some of these are WIP/probably not portable to other systems.
This also adds the ability to set multiple circuits at once.