HD Wallets: add a threshold and pre-generate new keys, if keys are used (Version 2)

Version 2 of pull request https://github.com/bitcoinj/bitcoinj/pull/42