[ecashaddrjs] Fix types for isValidCashAddress
Summary: TypeScript gives an error when optionalPrefix in not defined when calling isValidCashAddress, this PR allows both undefined or explicit false for no prefixes, or a user passed string as prefix
Test Plan: npm test
Reviewers: bytesofman, Fabien, O1 Bitcoin ABC, #bitcoin_abc
Reviewed By: bytesofman, O1 Bitcoin ABC, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D16331