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.