[ecash-herald] Lint for typescript
Summary:
ecash-herald ts implementation was in one go. Missed some linting as still getting familiar with ts linting and its settings.
changes are not significant though they can appear that way. Ordering of functions was moved around due to "no use before defined" rule. A few uses of "any" are supported with "expect error" comments as they related to over-complicated types related to functions developed before the ts implementation. Working them out is imo low impact and can wait until these functions are improved.
Test Plan: eslint . and no output; npm test and nothing broke
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D17118