Ignore too-long redeemScripts while loading wallet

This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
Merge pull request #4316

18116b0 Ignore too-long redeemScripts while loading wallet (Wladimir J. van der Laan)
sanity: autoconf check for sys/select.h
sanity: add libc/stdlib sanity checks

These are meant to test our back-compat stubs, but they are enabled for all
builds for the sake of consistency.
sanity: hook up sanity checks