Wallet: store key creation time. Calculate whole-wallet birthday.

This also encapsulate wallet-read state information into CWalletScanState.
Wallet: optimize rescan to skip blocks prior to birthday
allow txindex to be removed and add a reindex dialog

- adds a reindex dialog for Bitcoin-Qt to change -txindex without the need
  to supply -reindex
- now also does a -reindex, when removing the -txindex switch
changes to thread code (directly use boost::thread)

- removes our NewThread() function an replaces remaining calls with
  boost::thread with our TraceThread template
- remove ExitThread() function
- fix THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes
Merge pull request #1863 from jgarzik/keytime

"Wallet birthdays": store key create time; calc whole-wallet birthday
Merge pull request #2553 from Diapolo/threads

changes to thread code (directly use boost::thread)
fix comment about dust logic
send tx relay flag with version
Added GNU/kFreeBSD kernel name (TARGET_OS)

uname -s returns "GNU/kFreeBSD" on Debian GNU/kFreeBSD port. See http://www.debian.org/ports/kfreebsd-gnu/
Remove broken option to skip input checking for wallet txn.
fixed: include boost header as necessary

Without this include, sometimes BOOST_VERSION was defined and sometimes
it was not, depending on which includes came before it. The result was a
random mix of sleep or sleep_for for boost versions >= 1.50.
fixed: don't use thread::sleep_for where it's known to be broken

Fixes #2690.
Update HomeBrew osx makefile patch to account for recent changes to makefile
Refactor fee rules to make them actually readable.

This (nearly) doesn't change fee rules at all:
 * To make it into the fee transaction area, the dPriority comparison
   changed from < to <=
 * We now just ignore transactions > MAX_BLOCK_SIZE/4 instead of
   doing some calculations to require increasingly large fees as
   size increases.
Merge pull request #2769 from TheBlueMatt/master

Remove broken option to skip input checking for wallet txn.
Merge pull request #2766 from theuni/fix-shutdown-deadlock

Fix shutdown deadlock, ticket #2690
Merge pull request #2648 from Diapolo/txindex

allow txindex to be removed and add a reindex dialog
Merge pull request #2763 from bitsofproof/master

Send tx relay flag with version message
Merge pull request #2760 from cozz/cozz2

fix comment about dust logic
Move implementation of some CBlockLocator methods

Move out of main.h to improve compile times and add documentation
for what the methods do.