Too many bitcoins allowed in amount. (#2401)

Using magic number doesn't seem right. Could we factor this out, together with https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.cpp#L96 ?
And what about BitcoinUnits::parse() as well ?
Move core implementations to core.cpp
Merge pull request #2679 from vhf/patch-1

Too many bitcoins allowed as amount. (Issue #2401)
Truncate oversize 'tx' messages before relaying/storing.

Fixes a memory exhaustion attack on low-memory peers.
Merge pull request #2792 from sipa/coreimpl

Move core implementations to core.cpp
CWallet::TopUpKeyPool() takes optional pool size argument

Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
RPC: keypoolrefill gains optional size parameter