Refactor MinimalizeBigEndianArray t be part of CScriptNum
Summary: Also make the logic LE, like everything related to numbers
Test Plan: Move test case over to scriptnum_tests.cpp . Add check against CScriptNum::IsMinimallyEncoded to make sure both are consistent.
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1219