autotools: fix subdir m4 check, never let it return -I

If BDB_CPPFLAGS returns only "-I", the next argument sent to the preprocessor
is treated as a path. There are 2 fixes here:

1. Check in CPPFLAGS, as a user might have manually passed a path to check.
2. Ensure the value is not empty before setting BDB_CPPFLAGS to "-I value"
autotools: fix the Makefile.include to be safely included anywhere.

This way we can reuse rules rather than duplicating them.
win32: add version info to bitcoind.exe

TODO: Add icon info
win32: only check for windres for win32, and fail if missing
Skip unspendable outputs in consistency check
Merge pull request #3026 from sipa/checkunspend

Skip unspendable outputs in consistency check
internal miner: move 2 globals from main to miner

- moves 2 global variables from main.cpp/h to miner.cpp/h
- also removes 2 unneded includes in miner.cpp, that come from miner.h
  already
build: add libcrypt32 dep for new mingw. Also ensure that libgcc/libstdc++ are static-linked regardless of the toolchain config
Removes obselete HomeBrew patches
Upgrade gitian win32 to Precise 12.04.

mingw upgrade allows more hardening, compiler bug fixes and possibily win64 later.
Rename deps .zip files to be more consistent in revision format.
Boost #4258 build fix for mingw32
Upgrade gitian win32 to boost-1.54.0

Workaround 1.54.0 build bug, upstream #9156
Workaround 1.51.0+ human bug, upstream #7262

This commit also demonstrates a method to verify the integrity of inputs.
Update Qt 4.8.3 download link
Merge pull request #3027 from cozz/cozz2

GUI: fix sendcoinsdialog/sendcoinsentry
Merge pull request #3031 from Diapolo/miner

internal miner: move 2 globals from main to miner
Merge pull request #3035 from fanquake/remove-homebrew-patches

Remove obselete HomeBrew patches
Merge pull request #3034 from fanquake/corect-qt-download-link

Update Qt 4.8.3 download link in Gitian Descriptors README
several small Qt-related fixes

- make BitcoinGUI::showPaymentACK() use a reference for msg and use our
  own GUIUtil::HtmlEscape() function
- ensure QTimer usage in clientmodel is the same as in walletmodel
- remove an unneeded debug message in walletframe
- flag some parameters as unused in DebugMessageHandler()
- small code formatting changes
Merge pull request #3029 from wtogami/gitianwin32

Upgrade gitian win32 to Precise 12.04.
Merge pull request #3039 from Diapolo/Qt_misc

several small Qt-related fixes
Merge pull request #3015 from theuni/win32-version-info

Win32 version info