Move duplicate hex2bin and add bin2hex function so that application can use the functions and avoid code duplication. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>