Add testnet flag

Source: cryptonotefoundation
Add testnet constants
Reformat relevant code paths

There should be no changes to the code's logic in this commit other than
the introduction of THROW_WALLET_EXCEPTION to replace
THROW_WALLET_EXCEPTION_IF.
Formatting changes
Formatting and comments
Sort block template transactions by fee/size ratio

(Thanks boolberry!)
Pass destinations by value to construct_tx

This was getting copied anyway
Fix tx_pool
Reformat and document construct_tx

* More descriptive variable names
* (Hopefully) thorough comments
* Clearer logic
Formatting
Rename transfer to create_pending_transaction

Also removed unused overloads
Remove redundant parameter
Reorganize testnet constants
Separate p2p port for testnet
Separate rpc port for testnet
Separate network id for testnet
Pass tx and nonce to genesis block constructor
Add testnet genesis tx as output by CN reference
Add descriptions for RPC command line params
Separate testnet default data dir