Refactor: move code from key.h to key.cpp
Refactor: GetRandHash() method for util
Was showing a negative number. Changes to positive, since negative (T minus) usually indicates a future event.
Update License in File Headers

I originally created a pull to replace the "COPYING" in crypter.cpp and
crypter.h, but it turned out that COPYING was actually the correct
file.
Optimize orphan transaction handling

Changes suggested by Sergio Demian Lerner to
help prevent potential DoS attacks.
Remove invalid dependent orphans from memory

Remove orphan transactions from memory once
all of their parent transactions are received
and they're still not valid.
Thanks to Sergio Demian Lerner for suggesting this fix.
Further DoS prevention: Verify signatures last

Loop over all inputs doing inexpensive validity checks first,
and then loop over them a second time doing expensive signature
checks. This helps prevent possible CPU exhaustion attacks
where an attacker tries to make a victim waste time checking
signatures for invalid transactions.
Cache signature verifications

Create a maximum-10MB signature verification result cache.
This should almost double the number of transactions that
can be processed on a given CPU, because before this change
ECDSA signatures were verified when transactions were added
to the memory pool and then again when they appeared in
a block.
Serialize access to debug.log stream

Acquire an exclusive, advisory lock before sending output to debug.log
and release it when we're done. This should avoid output from multiple
threads being interspersed in the log file.

We can't use CRITICAL_SECTION machinery for this because the debug log
is written during startup and shutdown when that machinery is not
available.

(Thanks to Gavin for pointing out the CRITICAL_SECTION problems based
on his earlier work in this area)
Reopen debug.log on SIGHUP

The best log rotation method formerly available was to configure
logrotate with the copytruncate option.  As described in the logrotate
documentation, "there is a very small time slice between copying the
file and truncating it, so some logging data might be lost".

By sending SIGHUP to the server process, one can now reopen the debug
log file without losing any data.
remove strncasecmp() + strnicmp() calls and replace that code via boost::algorithm::istarts_with() / do not call ipcInit() on Mac and Windows as this is unneeded currently
Reorganize(): remove spurious TxnAbort()

If Reorganize() fails, then its caller, CBlock::SetBestChain(),
will call TxnAbort().

Redundant TxnAbort() calls are harmless.  The second will return an
error return value, with no other side effects.  TxnAbort() return
values are generally never checked.  The impact is nil.
Encapsulate BDB environment inside new CDBEnv class

Cleans up and organizes several scattered functions and variables related to
the BDB env.  Class CDBInit() existed to provide a
guaranteed-via-C++-destructor cleanup of the db environment.

A formal CDBEnv class provides all of this inside a single wrapper.
Create CDBEnv::TxnBegin(), and use it in CDB::TxnBegin()
Remove unused nested BDB transaction support
CDB::CDB: properly initialize activeTxn to NULL
Further CDBEnv encapsulation work.
start rows in askpassphrasedialog.ui at 0 (not 1)
Merge pull request #1363 from Diapolo/remove_strncasecmp

remove strncasecmp() + strnicmp() calls use boost::algorithm::istarts_with()
Merge pull request #1354 from fanquake/master

Update Header Licenses