Major reworking of settings, state machine, arrays, functions

added duration type logic, state for retrigger, renamed arrays to
separate program & settings out to save individually and put arrays in
proper places in the state machine, variable-izing bonjour, reworking
sensor function and adding inputTakeAction function