mtp: convert icon id using hexadecimal base instead of decimal one

This is a fix for regression introduced by 30697fe32d47 ("mtp: in
debug traces, print IDs as hexadecimal values instead of decimal
ones"), which changed format of icon id constructed in
get_file_info() from decimal to hexadecimal, while the inverse
conversion in do_open_icon_for_read() remained unchanged, using
decimal base.

Signed-off-by: Rok Mandeljc <rok.mandeljc@gmail.com>
mtp: improve validation of received thumbnail/sample data in do_open_icon_for_read()

With my tablet, the call to LIBMTP_Get_Thumbnail() in
do_open_icon_for_read() sometimes succeeds with return code 0, but
returns size 0 and NULL data pointer. Thus, subsequent read
operations return no data, and Nautilus ends up with invalid
preview icon.

This patch adds validation of returned data size, and treats size
0 same as if the call failed - reporting no icon data to be
available and causing Nautilus to read the actual file content to
obtain the preview icon.

Also, LIBMTP_destroy_filesampledata_t() is now called regardless
whether LIBMTP_Get_Representative_Sample() call succeeds or not.

Signed-off-by: Rok Mandeljc <rok.mandeljc@gmail.com>