Debug depends/stl

This depends on #4966 #4967 #4968 and #4969. Until those are merged or fixed in some way, _it will fail tests_. Thanks to ENikS for the motivation to get this done. This should generate the same test failures that msvc produces in its debug builds. It also allows for other tools to be plugged in down the road, namely clang's fsanitize options. For anyone (including pull-tester and Travis) building without using the new debug option, the depends changes are a no-op.

This adds the concept of debug/release to the depends, which I’ve been meaning to do for quite a while. If debug is used (make DEBUG=1), the depends are compiled using their respective debug options and flags. These flags are passed down to Bitcoin as well.

Additionally extra libstdc++ options are enabled, which will cause runtime failures for various stl bugs which would otherwise continue with undefined behavior. For these options, building Bitcoin with them is not enough, they require that dependencies are built the same way.

Devs may also wish to use these debug depends when tracking down bugs deep within dependencies.

This PR also fixes 2 of those stl issues. The rest have either already been fixed, or will be fixed by the PR’s listed above. At that point, the debug build should succeed and can be enabled for travis so that it may catch future issues.