Added chain ID for Namecoin.

AuxPoW support now depends on presence of an AuxPoW chain ID, rather than being Namecoin-specific. This enables support for Dogecoin AuxPoW.
clean up address and script types

this makes for consistent naming of the address/script types everywhere,
gives us some more flexibility to introduce new types,
makes #encode/decode_address more generic and
highlights the importance of carrying the address type along the hash160,
while still preserving the old APIs for compatibility

only change is the return value of Script#type