clear history when using clear button in RPC console

- current code does not clear history, when using the clear button, this
  is added
- remove a currently unused variable but add a TODO comment
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.
remove "checkorder" and "reply" P2P commands

These command are a leftover from send-to-IP transactions, which have been
removed a long time ago.
Also removes CNode::mapRequests and CNode::PushRequests, as these were
only used for the mentioned commands.
make optionsmodel query real proxy state for ::data()

- don't rely on the QSettings for cases ProxyUse and ProxySocksVersion and
  query the real values via the GetProxy() call
- add a missing "succesful =" for case ProxyUse in ::setData()
Bitcoin-Qt: add new GCC compiler hardening options

- this patch enables several new GCC compiler hardening options that
  allows us to increase the security of our binaries (see:
  https://wiki.debian.org/Hardening)

-D_FORTIFY_SOURCE=2:
Enables compile-time protection against static sized buffer overflows.

-Wl,-z,relro -Wl,-z,now:
Enables full RELRO (RELocation Read-Only), which is a generic mitigation
technique to harden the data sections of an ELF binary/process. See:
http://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/ for
further details.
Bitcoin-Qt: remove unneeded "--param ssp-buffer-size=1" flag

- that flag is not needed when using "-fstack-protector-all", so remove it
  (see:
  http://stackoverflow.com/questions/1629685/when-and-how-to-use-gccs-stack-protection-feature)
Added script that verifies authenticity of binaries on SourceForge
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.
Fixed compile error on FreeBSD 9.
See http://code.google.com/p/leveldb/issues/detail?id=98
Fixed 100% CPU utilization problem on FreeBSD 9
Fixes a race condition in CreateNewBlock and a future null deref on testnet.

CreateNewBlock was reading pindexBest at the start before taking the lock
so it was possible to have the the block content not match the prevheader
and this can also trigger a newly added assert in ConnectBlock.

I noticed this during a code review after twobitcoins reported that ab91bf39
(BIP30 for all blocks) could cause a null dereference on a modified node
that mined during the IBD, or on testnet when it reached heights 91842 and
91880 due to CreateNewBlock calling ConnectBlock with pindex->phashBlock NULL.
Fix out-of-bounds read noticed by Ricardo Correia

Sizeof() returned the size of a pointer instead of the size of the buffer.
Fixes issue #1924.
Merge pull request #1947 from centromere/freebsd_cpu_fix

Fixed 100% CPU utilization problem on FreeBSD 9
Don't force getblocktemplate to have a parameter.

This looks like it was just a munged merge when ultraprune
was committed.
Show warning when using prerelease version

Implements #1948

- Add macro `CLIENT_VERSION_IS_RELEASE` to clientversion.h
- When running a prerelease (the above macro is `false`):
  - In UI, show an orange warning bar at the top. This will be used for other
    warnings (and alerts) as well, instead of the status bar.
  - For `bitcoind`, show the warning in the "errors" field in `getinfo`
    response.
Merge pull request #1925 from Diapolo/gcc-hardening

GCC hardening for Bitcoin-Qt
ensure AskPassphraseDialog::eventFilter forwards events

- instead of "return false;" use "return QDialog::eventFilter(object,
  event);" to harmonize this event filter with our default behaviour
- remove orphan spaces found while editting the files
Merge pull request #1959 from Diapolo/eventFilter_askpassphrasedlg

ensure AskPassphraseDialog::eventFilter forwards events
Merge pull request #1955 from gmaxwell/gbt_paramfix

Don't force getblocktemplate to have a parameter.