Multiple changes

- updated readme (list of defined macros)
- updated readme (code examples)
- switchtd so string.format
- added X_ON,X_OFF,X_IS_ON, X_INPUT_BIT macros
- changed use of semicolons