Small bug fixes and rework of API.

This is current series of patch from linux-usb mailing list. This series depends on all previous series so please merge them first and then this will be only 5 commits.

Description from linux-usb:
In this series of patch I have fixed some bugs introduced some time ago. First of it was a copy-pasta bug in functions which allocates memory and the second one was missing read of bcdDevice gadget attribute.

Second part of this series contains small rework of libusbg API.
In those patches I have change functions related to configuration and function.

Currently when user would like to get a function, he should pass the whole name as in ConfigFS, but user should not need to know what is the naming convention of this file system. After those patches user will specify function type and instance name instead of string with file name from ConfigFS.

Similar changes has been done in configuration related functions.
After my changes user will have to specify only the ID (number) for configuration. Label may be omitted and library will use some default name. ID of configuration is unique so it's enough to get configuration.

This series of patch depends on all my previous series. I have also updated github pull request.

Please review and merge.