usb: gadget: f_fs: Reuse string indexes when possible
usb: gadget: f_fs: Reuse string indexes when possible

The FunctionFS driver can be used with a single composite device
(i.e.  Android gadget) which has a finite number of string indexes
that can be allocated. Economize the request for new string indexes
when re-binding an FFS function by first checking if the previously
allocated indexes can be reused. This will prevent running out of
indexes in long-running scenarios when dynamic userspace functions,
often the same one such as ADB, can get unbound and rebound many
times over a composite gadget's lifetime.

CRs-Fixed: 585982
Change-Id: Id8fa066307ef52262a169c9f21fc842b9cf3af7d
Signed-off-by: Jack Pham <cbd79eb9617449d4bb49d0087b0eb70c6cf062b0@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas