qt: fix use-after-free pattern

qstring.toUtf8() returns a QByteArray object and .constData() returns
a pointer inside that object. It is not safe to store this pointer as
it will become invalid after the statement. Store a const reference
instead. (Due to scoping differences, some are copy-assigned though.)

In the UAT dialog, strlen(bytes.constData()) has also been replaced by
bytes.size() as an optimization.

Caught by ASAN.

Reviewed-on: https://code.wireshark.org/review/5528
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
(cherry picked from commit 18f01099694ed5c2758105f893ba37589f552717)

Conflicts:
	ui/qt/conversation_dialog.cpp
	ui/qt/endpoint_dialog.cpp
	ui/qt/traffic_table_dialog.cpp
 [ files did not exist in 1.12 ]

Change-Id: Ib211d000a9b3f1bdd8ab4c8489a253af2df5fbd5
Reviewed-on: https://code.wireshark.org/review/5573
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>