add required libsecp256k1 to make flags
remove cruft
rename uninformative template parameter name CheckDistance to SafeCheckLast.

Also rename macro CHECK_DISTANCE to SAFE_CHECK_DISTANCE. Helps with
readability and makes pure intent of the code known just from looking at it.
allow unsafe deserialisation with transaction types.
replace serializer<Iter>::internal_copy() calls with std::copy()