CLI: Added interactive mode support for RX and TX, misc. refactoring.

See the README.md in the linux/apps directory for more details.

Note that -d <device> is now optional if only one device is connected.