[alias-server] Add util functions for getting byte count, use them to patch tg bot bytecount bug
Summary:
T2976
Depends on D13246
Telegram bot was giving utf8 length instead of hex bytecount. Per the spec, pricing will be determined by hex bytecount.
This diff corrects the issue with the telegram bot and introduces utility functions for converting between utf8 and hex.
Test Plan:
Review new util functions, new unit tests, and npm test
node index.js, create some aliases in cashtab with emojis, note telegram bot now counts emojis as 4 bytes
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D13247