Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev

Rebased-From: 89d91f6
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Fix crashing bug caused by orphan(s) with duplicate prevout.hash

Rebased-From: def2fdb
Rebased-By: Wladimir J. van der Laan
Limit CNode::mapAskFor

Tighten resource constraints on CNode.

Rebased-From: d4168c8
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Avoid returning many "inv" orphans

Rebased-From: 540ac45
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
doc: Remove outdated information about boost versions

Bitcoin core should work with any remotely recent boost version
if a proper build environment is present. Remove a confusing comment
from the build documentation.

Rebased-From: bd45b1a
build: Remove message about Ubuntu 13.10 when no boost sleep implementation found

It's only confusing people into thinking that they should mess with
boost versions, which should not be necessary to get bitcoind to work.

If there is a bug in the build system with autodetecting boost it needs
to be solved not worked around.

Rebased-From: 539abc4729ea16039d148cfa3b771929f7d37584
remove useless millisleep

reduces time to service requests improving performance

Rebased-From: 9189f5fe4df1ac7ea6ca75ceada867beafda90a9
Stricter handling of orphan transactions

Prevent denial-of-service attacks by banning
peers that send us invalid orphan transactions
and only storing orphan transactions given to
us by a peer while the peer is connected.

Rebased-From: c74332c67806ed92e6e18de174671a7c30608780
Make max number of orphan blocks kept in memory a startup parameter (fixes #4253)

Rebased-From: 7b45d943b29a443f1ac808c9ee4eeed6df0db9cc
Store fewer orphan tx by default, add -maxorphantx option

There is no reason to store thousands of orphan transactions;
normally an orphan's parents will either be broadcast or
mined reasonably quickly.

This pull drops the maximum number of orphans from 10,000 down
to 100, and adds a command-line option (-maxorphantx) that is
just like -maxorphanblocks to override the default.
Update release notes
Update release notes
build: osx: Fix incomplete framework packaging for codesigning

Starting with 10.9, Framework versions must be signed individually, rather
than as a single bundle version, in order to be properly codesigned. This
change ensures that the proper plist files and symlinks are present prior to
packaging.

Rebased-From: 65f3fa8
Remove mention of MacPorts from OSX build docs

Rebased-From: d547ebf