Moved EventSend calls to the TBSetNodeEventState() function. This has
two benefits: (1) More general (2) Regains ability to run without the event system. Previously, since programs that watned to set node state had to 'use event', this broke our ability to run without the event system. Now, we can do a check in libdb for the event system, and not use it if EVENTSYS is not set. If not, we update state in the database directly rather than sending an event. Also added equivalent calls for node operational mode, as well as new constants for both state and mode. Converted power and node_reboot to use this new scheme.
Showing with 112 additions and 17 deletions