Extension of java.text.Format for locale-sensitive Bitcoin value formatting & parsing.
Extension of java.text.Format for locale-sensitive Bitcoin value formatting & parsing.
Fix key derivation
Changes to the `Coin` class: some convenience comparison operators;
`parseCoin()` now accepts negative values; the check for an excessive
value is moved to the constructor from `parseCoin()` and uses
`checkArgument()`; some `Coin`-type constants broken out into one
`long` one `Coin` in order to be usable in the constructor.
Corresponding tests included.  The `BitcoinURI` class constructor
throws exception on parsing a negative amount, which is needed now
that `Coin` class accepts negative amounts.
`TransactionOutput` class private `value` member changed to type `long` from `Coin`.
Married HD wallets: introduce shadow keychain notion

Pull request: #99
Based on design notes:
https://groups.google.com/d/msg/bitcoinj/Uxl-z40OLuQ/e2m4mEWR6gMJ
Improvement of getFollowingKeys

First of all, freshAddress was actually asking for a fresh key twice for non-married keychain. That was fixed by moving first call (needed only for married chain) inside the getFollowingKeys. As the latter now started to return all keys in a marriage and not only following ones, it was renamed to freshMarriedKeys.
Having all the keys in one block allows to do simple derivation path check to make sure keychains are in sync (as per @devrandom suggestion)
Prevent marriage of used keychain

 addFollowingAccounts method now has the check that active keychain has no keys in use. This would prevent divergence of derivation paths for followed and following keys. In future this behaviour should be replaced with some sort of key rotation.
Explain why a transaction output value is kept as a long rather than Coin.
Wallet: move setTag to the extensions section of the file.
Wallet: remove a few dead stores identified via static analysis.
Add a forgotten @Test annotation and fix the expected exception type.
Remove some superfluous new String() calls around HEX.encode, now it has a sane API.
Wallet tool launcher for Windows

Essentially it is just a port of wallet-tool bash script
Fix autosave in WalletTool on Windows

Wallet.saveToFile failed to remove original wallet file because WalletTool
left open input stream. This error happened on Windows-specific code path

Stacktrace:
```
Failed to save wallet! Old wallet should be left untouched.
java.io.IOException: Failed to delete canonical wallet file for
replacement with autosave
        at com.google.bitcoin.core.Wallet.saveToFile(Wallet.java:834)
	        at
		com.google.bitcoin.core.Wallet.saveToFile(Wallet.java:863)
		        at
			com.google.bitcoin.tools.WalletTool.saveWallet(WalletTool.java:851)
			        at
				com.google.bitcoin.tools.WalletTool.main(WalletTool.java:362)
```
Give regtest mode its own ID so wallets don't get mixed up between regtest and testnet.
Rename addFollowingAccounts -> addFollowingAccountKeys
Merge branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'