belt-and-braces approach:
- first commit fixes the bug where maxsigcachesize being zero causes segfault
- second commit handles maxsigcachesize being negative by setting it to zero if a negative number is provided
- third commit handles maxsigcachesize being too large by setting it to MAX_MAX_SIG_CACHE_SIZE if an unreasonably large number is provided.
I've set MAX_MAX_SIG_CACHE_SIZE absurdly high (16GB) for now, so setting maxsigcachesize to anything unreasonably large will still cause a bad_alloc for most users. Input welcomed on what a more reasonable MAX_MAX_SIG_CACHE_SIZE should be, or whether we should leave it out entirely.