Breaks dependency cycle between Script.<clinit>, Script.<init> and NetworkParamenters.<init>. Resolves issue #549.

Script.<clinit> depended both on Script.<init> and NetworkParameters.<init> to prepare ScriptChunk cache.

At the same time NetworkParameters.<init> depended on Script.<clinit> by using Script.writeBytes().

The fix frees Script.<clinit> from both the NetworkParameters and Script objects.

This should remove the root cause behind NetworkParameters construction not being thread safe.
Clarify BlockChainListener javadocs a bit.
FullPrunedBlockChain: fixed typo

s/rage/range/g
CoinFormat class, for formatting and parsing coin values to and from human readable form.
Minor refactorings and fixes in VersionMessage.

* Fixed toString() bug.
* Updated comments to match present Bitcoin Core behavior with respect to User-Agent.
* Removed constructor accepting a boolean. This changes public API but neither multibit
  nor bitcoin-wallet nor mycelium nor hive-android uses this version of constructor.
  The rationale is to avoid passing a boolean to a method as this makes code hard to read.
  Client classes updated to preserve original semantic. All tests pass.
Wallet: rename setLookaheadThreshold() to setKeychainLookaheadThreshold()

for consistency
Remove undocumented and unused Transaction constructor. I found it misleading because it allows you to pass in a hash, but the hash can be changed without notice.
Fix Wallet.isTransactionRelevant() JavaDoc. There is no "includeDoubleSpending".
Fix Wallet.checkForDoubleSpendAgainstPending() JavaDoc. It returns a boolean.
Fix link in Wallet.notifyTransactionIsInBlock() JavaDoc.
Copy @throws from the JavaDoc of Wallet.completeTx() to all calling methods.
Remove unused CouldNotAdjustDownwards. Move JavaDoc to the real one.
Allow zero repetitions for CoinFormat.repeatOptionalDecimals(). Also add tests.
Fixed bitcoinj DoS. It could have been crashed by a malicious message.

Bitcoinj can be crashed with OutOfMemory by sending a message with
a large claimed var_str length or bytes array length.

The actual message size does not matter, it's the claimed length that matters.

This affects all bitcoinj-based apps that receive messages including Multibit, Android Bitcoin Wallet, Mycelium and Hive.

The fix limits accepted length to max message size (32 MB).

Signed-off-by: Mike Hearn <mike@plan99.net>
HD wallet: currentKey is now stable after serialization roundtrip

At the moment currentKeys map of KeyChainGroup is not restored after
deserialization and subsequent call to currentKey produces different
key then expected.
Proposed solution reconstructs currentKey map on deserialization using
stored numbers of issues keys. It is
not future-proof as it assumes only RECEIVE and CHANGE keys are being
used.
Add a method to deserialize a DeterministicKey from a byte-array rather than from the base-58 encoding thereof.
Update AUTHORS file with recent contributors
Add a missing lock on BasicKeyChain.getBloomFilter
Fix failing deserialization of wallet with an empty HD chain

Error occurred when deserializing wallet if either internal or external
zero account key chain of this wallet has no keys issued
Fix failing WalletProtobufSerializerTest