Add assertion to randrange that input is not 0
Summary:
randrange is not intended to be called with argument 0.
This is a backport of Core PR17293
Test Plan: ninja all check-all
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D8237