testnet support

Hello,

I've added support for testnet coins. I'm assuming you won't like it as is, as it's pretty awkward, but I figured I should make a proposition first before asking for advice on how to best do it.


Hm... what about other networks? It might be an interesting API decision to provide support for them.