small cleanup in src/compat .h and .cpp

- add license header
- fix include guards
- fix indentation
Add nLocalServices info to RPC getinfo

Also show full 64 bits of services. Previously service bits >32 that
were advertised just didn't show up at all.
Add comment regarding experimental-use service bits

As per mailing list discussion.
Merge pull request #4380

38405ac Add comment regarding experimental-use service bits (Peter Todd)
99ddc6c Add nLocalServices info to RPC getinfo (Peter Todd)
Add a built-in SHA256/SHA512 implementation.

This also moves the HMAC-SHA512 implementation to sha2.cpp.
Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL.
Remove getwork() RPC call
Switch miner.cpp to use sha2 instead of OpenSSL.
Add built-in SHA-1 implementation.
Move crypto implementations to src/crypto/
Add built-in RIPEMD-160 implementation
Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible
Extend and move all crypto tests to crypto_tests.cpp
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.
Add <Hasher>::OUTPUT_SIZE
Merge pull request #4379 from Diapolo/cleanup_compat

small cleanup in src/compat .h and .cpp
Merge pull request #4100

a0495bb Add <Hasher>::OUTPUT_SIZE (Pieter Wuille)
4791b99 crypto: create a separate lib for crypto functions (Cory Fields)
f2647cc crypto: explicitly check for byte read/write functions (Cory Fields)
5437248 build: move bitcoin-config.h to its own directory (Cory Fields)
3820e01 Extend and move all crypto tests to crypto_tests.cpp (Pieter Wuille)
7ecd973 Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible (Pieter Wuille)
a5bc9c0 Add built-in RIPEMD-160 implementation (Pieter Wuille)
13b5dfe Move crypto implementations to src/crypto/ (Pieter Wuille)
1cc344c Add built-in SHA-1 implementation. (Pieter Wuille)
85aab2a Switch miner.cpp to use sha2 instead of OpenSSL. (Pieter Wuille)
cf0c47b Remove getwork() RPC call (Pieter Wuille)
7b4737c Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL. (Pieter Wuille)
977cdad Add a built-in SHA256/SHA512 implementation. (Pieter Wuille)
Make CBlockIndex a subclass of CBlockHeader