libusbg: Fix potential memory leak in usbg_init()

Memory allocated with asprintf() for variable path
could be not free() in some cases. Fix this issue by
doing some small refactoring.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
libusbg: Add support for functionFS.

Recent kernel versions supports creation of functionFS based
functions using configFS, so this library also should support this.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
libusbg: Update show gadget example support ffs functions.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
libusbg: Add example to show how to create ffs functions.

Add example which demonstartes two ways of creating ffs
based usb functions.

How to set-up gadget using this example:
1) Run gadget-ffs

2) Mount both instances:
 $ mount my_dev_name -t functionfs /path/to/mount/dir1
 $ mount my_awesome_dev_name -t functionfs /path/to/mount/dir2

3) Run ffs daemons for both instances:
 $ my-ffs-daemon /path/to/mount/dir1
 $ my-ffs-daemon /path/to/mount/dir2

4) Enable your gadget:
 $ echo "my_udc_name" > /sys/kernel/config/usb_gadget/g1/UDC

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Merge pull request #6 from kopasiak/devel_ffs

Add support for functionFS based usb functions