Added Doxygen documentation for 'ctapi' and 'usb_device'
Minor refactorings