tests for SetCompact and GetCompact of CBigNum
reimplement CBigNum's compact encoding of difficulty targets

Use shifts instead of going through the MPI representation of BIGNUMs.
Be careful to keep the meaning of 0x00800000 as sign bit.
Add NATIVE_WINDOWS

With a change of libs, and specifying NATIVE_WINDOWS as TARGET_OS it should compile libleveldb.a and libmemenv.a just fine, it did for me and Diapolo when testing.
Add -walletnotify to call an external script on wallet transactions
Do not reorganize if new branch has same amount of work
o Added threadsafety.h - a set of macros using the -Wthread-safety
  feature in clang.  These macros should primarily be used to
  document which locks protect a given piece of data.  Secondary it
  can be used to document the set of held and excluded locks when
  entering a function.
o Added AnnotatedMixin which adds locking annotations to the mutex
  API, compatible with clang's -Wthread-safety
o Annotated lock-like functions in net.h.
o Removed unused function EndMessageAbortIfEmpty
Change 'make' to $(MAKE) in leveldb make command line
Simplify CMutexLock

o Remove unused Leave and GetLock functions
o Make Enter and TryEnter private.
o Simplify Enter and TryEnter.
  boost::unique_lock doesn't really know whether the
  mutex it wraps is locked or not when the defer_lock
  option is used.
  The boost::recursive_mutex does not expose this
  information, so unique_lock only infers this
  knowledge.  When taking the lock is defered, it
  (randomly) assumes that the lock is not taken.
  boost::unique_lock has the following definition:

        unique_lock(Mutex& m_,defer_lock_t):
            m(&m_),is_locked(false)
        {}

        bool owns_lock() const
        {
            return is_locked;
        }
  Thus it is a mistake to check owns_lock() in Enter
  and TryEnter - they will always return false.
Split off CBlockHeader from CBlock

Cleaner and removes the need for the application-specific flags in
serialize.h.
Add new RPC "lockunspent", to prevent spending of selected outputs
and associated RPC "listlockunspent".

This is a memory-only filter, which is empty when a node restarts.
ConnectBlock(): fix error() format to be unsigned

- I introduced the wrong format macro with my former patch (#2018), this
  needs to be signed not unsigned (thanks Luke-Jr)
Merge pull request #2022 from Diapolo/fix_#2018

fix pull #2018
Bitcoin-Qt: fix crash on Windows caused by CDBEnv::EnvShutdown()

- can be triggerd by just adding -proxy=crashme with 0.7.1
- crash occured, when AppInit2() was left with return false; after the
  first call to bitdb.open() (Step 6 in init)
- this is caused by GetDataDir() or .string() in CDBEnv::EnvShutdown()
  called via the bitdb global destructor
- init fDbEnvInit and fMockDb to false in CDBEnv::CDBEnv()
Add assert and comment for subtle pay-to-script-hash logic
Deploy properly with Nokia Qt installer's Frameworks
Merge pull request #2031 from gavinandresen/scriptcomment

Add assert and comment for subtle pay-to-script-hash logic
Merge pull request #2024 from Diapolo/fix_qt_crash

Bitcoin-Qt: fix crash on Windows caused by CDBEnv::EnvShutdown()
Merge pull request #1980 from sipa/noreorgsame

Do not reorganize if new branch has same amount of work