Cleanup 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