encoding: Change global functions to be members of EncodingUtils.

Change-Id: Ie1361b2b3fef6ab8cf2e17e0d23bbffb6b0918b9
tests: Moved decodeHexInterest, etc. to member of EncodingUtils.

Change-Id: I8e2bc1fa0c1d188a206492e2a6e23f0f3fd57d00