FreeBSD and OpenBSD build fixes

OpenBSD is failing some tests related to wallet coin selection AND SHOULD NOT UNDER ANY CIRCUMSTANCES BE USED AS THE OS ON ANY INSTANCES HANDLING A WALLET YET.

The *.d cleanup in the clean target is needed for instances when you try and link against a bad db version (<4.8) but they shouldn't exist under "normal" circumstances. Should still clean them up.

The swap of the bdb and boost include search paths is intentional. The openbsd port/package for db4 is stuck at 4.6 for right now and exists in /usr/local. Boost also exists in /usr/local so if it's specified first you can't get the linker to find the correct bdb.

Getting the unit tests working on OpenBSD requires patching the boost 1.42 port before building as the provided one will not work with any unit tests whatsoever.

I'll write up build instructions for both platforms for a different pull request.

I've tested that this builds on both OpenBSD 5.1 and FreeBSD 9.0-RELEASE-p4. (AKA, current stable versions as of this writing.)

I've also tested that it does not break builds on debian wheezy.

Edit:

FreeBSD build example:

BOOST_INCLUDE_PATH=/usr/local/include \
BOOST_LIB_PATH=/usr/local/lib \
BDB_INCLUDE_PATH=/usr/local/include/db48 \
BDB_LIB_PATH=/usr/local/lib/db48 \
gmake -f makefile.unix -j8 USE_UPNP= bitcoind test_bitcoin

OpenBSD build example:

BOOST_INCLUDE_PATH=/usr/local/include \
BOOST_LIB_PATH=/usr/local/lib \
BDB_INCLUDE_PATH=/opt/OpenBSD/5.1/amd64/db4-4.8.30/include \
BDB_LIB_PATH=/opt/OpenBSD/5.1/amd64/db4-4.8.30/lib \
BOOST_LIB_SUFFIX=-mt \
gmake -f makefile.unix -j8 USE_UPNP= bitcoind test_bitcoin

See this pastebin for details on the failing unit tests on OpenBSD: http://pastebin.com/kFjiXui2