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
Fixed compile error on FreeBSD 9.
See http://code.google.com/p/leveldb/issues/detail?id=98
fix some double-spaces in strings

- remove some unneeded stuff in sendcoinsentry.ui
- harmonize some "Error:"-messages
Fixed making leveldb with custom CFLAGS/CXXFLAGS in the same way as makefile.unix
Bugfix: do not keep relaying spent wallet transactions

The original test (checking whether the transaction occurs in the
txindex) is not usable anymore, as it will miss anything already
fully spent. However, as merkle transactions (and by extension,
wallet transactions) track which block they were last seen being
included in, we can use that to determine the need for
rebroadcasting.
Comments for constants
Merge pull request #1973 from sipa/comconst

Comments for constants
Merge pull request #1971 from sipa/bugfix_norelayspent

Bugfix: do not keep relaying spent wallet transactions
remove printf redefinition from bitcoinrpc.cpp

- as the redefiniton of printf happens in util.h, which is included in
  bitcoinrpc.cpp, we don't need another redefinition
Remove -detachdb and stop's detach argument.

As the only BDB database left is the wallet, and it is always
detached.

Also remove IsChainFile() predicate and related chainfile-specific
logic.
Cache size optimizations
RPC, cosmetic: push down ReadHTTPStatus() calls into ReadHTTP() callers

ReadHTTPStatus() is currently overloaded:  In client mode, it properly parses
and receives an HTTP status line.  In server mode, it incorrectly parses the
HTTP request line as an HTTP status line.

This server mode bug has never mattered, because the RPC server never
cared about the URI (path) provided in the HTTP request.  That will change in
the future, so go ahead and begin fixing the problem.

This patch is cosmetic, and should result in NO behavior changes.

Further renames:
ReadHTTPHeader -> ReadHTTPHeaders
ReadHTTP -> ReadHTTPMessage
RPC: HTTP server uses its own ReadHTTPRequestLine()
rather than reusing ReadHTTPStatus() from the client mode.

The following additional HTTP request validations are added, both in line with
existing HTTP client practice:

1) HTTP method must be GET or POST.  Most clients use POST, some
   use GET.  Either way, this continues to work.
2) HTTP URI must start with "/" character.
   Normal URI is "/" (a 1-char string), so this is fine.
VariantClear@4 + shutdown@8 patch

merged 2 windows:LIBS lines so they happen when they need to (#976)
added -loleaut32 to fix VariantClear
moved -lws2_32 and others to existing windows:LIBS line
Merge pull request #1830 from Diapolo/trans_rem_spaces

fix some double-spaces in strings
Do not reorganize if new branch has same amount of work
Qt: small header changes / fixes

- ensure header inclusion guard is named after the header file
- add missing comments at the end of some inclusion guards
- add a small Qt5 compatibility fix in macdockiconhandler.h
Merge pull request #1981 from sipa/caches

Cache size optimizations
Add CBufferedFile
LoadExternalBlockFile switched to CBufferedFile