Bing code up to date with rc-switch r213

This patch merges changes from original author to bring the implementation up to date. It merges all changes up to revison 213.

Addtionally to this, the send command was change to be able to support different types of sending commands in one command.

Usage output of `send` command:
 ```
usage: send <type> <arg1> ... <argN>
  type - the type to use for sending the signal
  arg1 .. argN - depending on the type the list of arguments

Supported types:
  dip - Switches controlled by DIP switches
        arg1 - the system code
        arg2 - the unit code
        arg3 - command
        Example: ./send dip 00001 2 0

  rev - Switches from REV manufactor
        arg1 - the channel (a..f)
        arg2 - the device number
        arg3 - command
        Example: ./send dip a 2 0
```

I saw that there are other people implementing REV support and I guess they are also trying to update the implementation to the recent version of the original author. Maybe parts of this patch are also in other pull request.

I think things should be merged here to avoid confusion about other pull requests and safe time for others, trying to also update to a recent version of the original author to have support for REV devices.