Bugfix: getwork: NULL pindexPrev across CreateNewBlock, in case it fails
Merge branch 'bugfix_CNBerr_daggy' into bugfix_CNBerr

Conflicts:
	rpc.cpp
Bugfix: getmemorypool: NULL pindexPrev across CreateNewBlock, in case it fails
CreateNewBlock: Check that the produced CBlock is acceptable (except for proof-of-work and merkletree, since those need to be provided later)

This throws an exception from CreateNewBlock otherwise, which is not safe without #1245!
CBigNum: Convert negative int64 values in a more well-defined way

Since the minimum signed integer cannot be represented as positive so long as its type is signed, and it's not well-defined what happens if you make it unsigned before negating it, we instead increment the negative integer by 1, convert it, then increment the (now positive) unsigned integer by 1 to compensate
Make truncating the debug.log file an option.

Useful for developers who need to refer to futher back in debug.log history, but who don't want to
enable the -debug option and all the verbosity that comes with that.
Include human readble format for nRequestTime.
Show when node is misbehaving, not just at the point that it gets banned.
write used OpenSSL library version to debug.log
update Boost version to 1.49 for Windows in the Qt project file

- add -s flag as we also use a static build in makefile.mingw
show used OpenSSL library version in debug window
CHashWriter that does SHA256 in-place during serialization
Merge pull request #1464 from Diapolo/GUI_showSSLVersion

GUI: show used OpenSSL library version in debug window
replace some ugly code in addressbookpage.cpp

- add signals signMessage() and verifyMessage() in addressbookpage.cpp
- connect to them in bitcoingui.cpp to switch to the corresponding tab in the Sign/Verify Message dialog
- make gotoSignMessageTab() and gotoVerifyMessageTab() private slots
Fix Qt build on OSX

Compiling boost::interprocess::message_queue against
boost 1.50 macports with -arch i386 (how releases are built,
for minimum download size and maximum compatibility) is failing:

src/qt/qtipcserver.cpp:37: error: no matching function for call to ‘boost::interprocess::message_queue_t<boost::interprocess::offset_ptr<void, int, long unsigned int, 0u> >::timed_receive(char (*)[257], long unsigned int, size_t&, unsigned int&, boost::posix_time::ptime&)’

This is probably a boost or macports bug, but since interprocess::message_queue
is only used for URI support, which isn't implemented on OSX anyway, I fixed
the build by #ifdef'ing out that code.
Merge pull request #1569 from Diapolo/addressbookpage

replace some ugly code in addressbookpage.cpp
Merge branch 'checknewblock_0.6.0' into checknewblock

Conflicts:
	src/main.cpp
Run BDB disk-less for test_bitcoin
Persistently poll for balance change when number of blocks changed

Fixes #1452. Until we can make the logic water-tight *and* are notified in every
case the balance might have changed, remove the premature optimization and
simply recompute the balance every half a second when the number of blocks changed.
fix for build.h regeneration failure when compiling on Windows

- as the "||" operator is not known to qmake use "|" instead,
  which ensures the code in brackets does never get executed on Windows