build: make a distinction between static app ldflags and static lib ldflags

For windows builds, exe's are always static, but libs should still conform to
--enabled-shared and --enable-static.
build: mingw needs libssp for hardening with dlls
build: check visibility attributes
build: remove internal/protected build attribute checks

They're not necessary, and not always supported. We only need to know about
hidden and default.
build: add libbitcoinconsensus files and hook up the lib build

Credit BlueMatt for libbitcoinsonsensus.h/cpp
build: add --with-libs so that libs are optional
build: add quick consensus lib tests

They should be hooked up in other places as well, but this is a start.
build: shared lib build should work reasonably well now
build: fix static dll link for mingw

dll's are no longer dynamically linked to libgcc/libstdc++/libssp
build: pad header for osx libs

This ensures that users of the lib will be able to mangle the paths to work
in their bundles.
Merge pull request #5235

9eb5a5f build: pad header for osx libs (Cory Fields)
9ed8979 build: fix static dll link for mingw (Cory Fields)
19df238 build: shared lib build should work reasonably well now (Cory Fields)
269efa3 build: add quick consensus lib tests (Cory Fields)
cdd36c6 build: add --with-libs so that libs are optional (Cory Fields)
2cf5f16 build: add libbitcoinconsensus files and hook up the lib build (Cory Fields)
ee64c53 build: remove internal/protected build attribute checks (Cory Fields)
f36a40f build: check visibility attributes (Cory Fields)
811a765 build: mingw needs libssp for hardening with dlls (Cory Fields)
e0077de build: make a distinction between static app ldflags and static lib ldflags (Cory Fields)