Added DeviceManager

This class now manages the application device list, scanning for
devices, and releasing them when they are no longer needed.

This fixes bug 108.