Added testnet support just to p2sh_scriptaddr function

The 'p2sh_scriptaddr' was only working for mainet, and has hardcoded version byte. I've added a 'testnet' parameter which do not interfer with original functionality.

Update: i've changed the "testnet" parameter to similar "magicbyte" parameters found on main.py (ie: "pubkey_to_address" function) to make it more flexible and eventually support altcoins, as sugested by @edmundedgar on bitcointalk.

Maybe it will be usefull to have a table somewhere on documentation about the "magicbyte"s for XBT mainnet/testnet