build: move bitcoin-config.h to its own directory

This allows us to include its path without making other header includes valid.
crypto: explicitly check for byte read/write functions

Don't depend on hard-coded platform lists
crypto: create a separate lib for crypto functions

This lib has no dependencies on other bitcoin functionality. Attempting to
use bitcoin headers will result in a failure to compile.