Bugfix: prioritisetransaction: Do some basic sanity checking on txid

Besides giving a nicer error, this also prevents logging arbitrary data (which could have been used to exploit log readers) into debug.log

This fixes both issues reported by @SergioDemianLerner on #5398
Why are you leaving our the ``strHex`` variable name but supply ``strName``? Seems you are not following your own practises :-P.