build: Fix search for brew-installed BDB 4 on OS X
build: Fix search for brew-installed BDB 4 on OS X

On OS X, when searching Homebrew keg-only packages for BDB 4.8, if we find it,
use BDB_CPPFLAGS and BDB_LIBS instead of CFLAGS and LIBS for the result. This
is (1) more correct, and (2) necessary in order to give this location
priority over other directories in the include search path, which may include
system include directories with other versions of BDB.

dscotese/bitcoin,litecoin-project/litecoin,bitcoinknots/bitcoin,bitcoinsSG/bitcoin,bitcoinknots/bitcoin,jonasschnelli/bitcoin,Sjors/bitcoin,domob1812/namecore,andreaskern/bitcoin,jlopp/statoshi,andreaskern/bitcoin,GroestlCoin/GroestlCoin,mm-s/bitcoin,apoelstra/bitcoin,jonasschnelli/bitcoin,particl/particl-core,n1bor/bitcoin,anditto/bitcoin,dscotese/bitcoin,jonasschnelli/bitcoin,anditto/bitcoin,instagibbs/bitcoin,domob1812/namecore,namecoin/namecoin-core,mm-s/bitcoin,bitcoin/bitcoin,jlopp/statoshi,apoelstra/bitcoin,qtumproject/qtum,cdecker/bitcoin,rnicoll/bitcoin,bitcoin/bitcoin,ElementsProject/elements,JeremyRubin/bitcoin,jlopp/statoshi,EthanHeilman/bitcoin,bitcoinsSG/bitcoin,pstratem/bitcoin,tecnovert/particl-core,lateminer/bitcoin,rnicoll/bitcoin,bitcoin/bitcoin,MeshCollider/bitcoin,namecoin/namecore,namecoin/namecore,ElementsProject/elements,JeremyRubin/bitcoin,fujicoin/fujicoin,domob1812/bitcoin,bitcoinknots/bitcoin,andreaskern/bitcoin,cdecker/bitcoin,GroestlCoin/bitcoin,Xekyo/bitcoin,fanquake/bitcoin,fanquake/bitcoin,prusnak/bitcoin,MarcoFalke/bitcoin,cdecker/bitcoin,alecalve/bitcoin,apoelstra/bitcoin,jambolo/bitcoin,apoelstra/bitcoin,jlopp/statoshi,achow101/bitcoin,particl/particl-core,mm-s/bitcoin,MeshCollider/bitcoin,andreaskern/bitcoin,mruddy/bitcoin,AkioNak/bitcoin,mruddy/bitcoin,particl/particl-core,jnewbery/bitcoin,anditto/bitcoin,AkioNak/bitcoin,pataquets/namecoin-core,prusnak/bitcoin,GroestlCoin/bitcoin,achow101/bitcoin,jnewbery/bitcoin,domob1812/bitcoin,n1bor/bitcoin,particl/particl-core,rnicoll/bitcoin,ajtowns/bitcoin,tecnovert/particl-core,jambolo/bitcoin,jlopp/statoshi,mruddy/bitcoin,jambolo/bitcoin,alecalve/bitcoin,apoelstra/bitcoin,tecnovert/particl-core,ajtowns/bitcoin,sipsorcery/bitcoin,AkioNak/bitcoin,practicalswift/bitcoin,n1bor/bitcoin,mruddy/bitcoin,achow101/bitcoin,namecoin/namecoin-core,MeshCollider/bitcoin,domob1812/namecore,yenliangl/bitcoin,lateminer/bitcoin,lateminer/bitcoin,midnightmagic/bitcoin,domob1812/bitcoin,AkioNak/bitcoin,sipsorcery/bitcoin,pataquets/namecoin-core,GroestlCoin/bitcoin,fanquake/bitcoin,kallewoof/bitcoin,MeshCollider/bitcoin,kallewoof/bitcoin,instagibbs/bitcoin,yenliangl/bitcoin,pstratem/bitcoin,tecnovert/particl-core,rnicoll/dogecoin,AkioNak/bitcoin,yenliangl/bitcoin,JeremyRubin/bitcoin,fujicoin/fujicoin,anditto/bitcoin,qtumproject/qtum,midnightmagic/bitcoin,litecoin-project/litecoin,midnightmagic/bitcoin,midnightmagic/bitcoin,sstone/bitcoin,rnicoll/bitcoin,kallewoof/bitcoin,EthanHeilman/bitcoin,GroestlCoin/GroestlCoin,dscotese/bitcoin,mm-s/bitcoin,jamesob/bitcoin,dscotese/bitcoin,prusnak/bitcoin,EthanHeilman/bitcoin,rnicoll/bitcoin,litecoin-project/litecoin,namecoin/namecoin-core,rnicoll/dogecoin,rnicoll/dogecoin,domob1812/bitcoin,mruddy/bitcoin,namecoin/namecore,Xekyo/bitcoin,JeremyRubin/bitcoin,MarcoFalke/bitcoin,litecoin-project/litecoin,qtumproject/qtum,dscotese/bitcoin,yenliangl/bitcoin,EthanHeilman/bitcoin,pstratem/bitcoin,n1bor/bitcoin,dscotese/bitcoin,JeremyRubin/bitcoin,domob1812/bitcoin,particl/particl-core,GroestlCoin/GroestlCoin,ajtowns/bitcoin,MeshCollider/bitcoin,bitcoinsSG/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,Xekyo/bitcoin,namecoin/namecore,cdecker/bitcoin,jnewbery/bitcoin,yenliangl/bitcoin,domob1812/namecore,EthanHeilman/bitcoin,practicalswift/bitcoin,midnightmagic/bitcoin,rnicoll/dogecoin,achow101/bitcoin,ajtowns/bitcoin,MeshCollider/bitcoin,namecoin/namecoin-core,rnicoll/bitcoin,instagibbs/bitcoin,qtumproject/qtum,GroestlCoin/GroestlCoin,jonasschnelli/bitcoin,sstone/bitcoin,fanquake/bitcoin,Sjors/bitcoin,practicalswift/bitcoin,jnewbery/bitcoin,practicalswift/bitcoin,bitcoin/bitcoin,alecalve/bitcoin,alecalve/bitcoin,kallewoof/bitcoin,prusnak/bitcoin,Xekyo/bitcoin,andreaskern/bitcoin,pataquets/namecoin-core,pataquets/namecoin-core,cdecker/bitcoin,mm-s/bitcoin,GroestlCoin/GroestlCoin,bitcoinsSG/bitcoin,AkioNak/bitcoin,yenliangl/bitcoin,rnicoll/dogecoin,particl/particl-core,kallewoof/bitcoin,EthanHeilman/bitcoin,sstone/bitcoin,litecoin-project/litecoin,achow101/bitcoin,jamesob/bitcoin,namecoin/namecoin-core,jamesob/bitcoin,sipsorcery/bitcoin,fanquake/bitcoin,anditto/bitcoin,MarcoFalke/bitcoin,mm-s/bitcoin,domob1812/namecore,instagibbs/bitcoin,prusnak/bitcoin,bitcoin/bitcoin,andreaskern/bitcoin,jonasschnelli/bitcoin,jambolo/bitcoin,pataquets/namecoin-core,ajtowns/bitcoin,ElementsProject/elements,GroestlCoin/bitcoin,ElementsProject/elements,kallewoof/bitcoin,pstratem/bitcoin,MarcoFalke/bitcoin,sipsorcery/bitcoin,bitcoinsSG/bitcoin,instagibbs/bitcoin,domob1812/bitcoin,fujicoin/fujicoin,alecalve/bitcoin,ElementsProject/elements,JeremyRubin/bitcoin,namecoin/namecore,mruddy/bitcoin,Sjors/bitcoin,qtumproject/qtum,Xekyo/bitcoin,ajtowns/bitcoin,GroestlCoin/bitcoin,sstone/bitcoin,n1bor/bitcoin,bitcoinknots/bitcoin,jambolo/bitcoin,sstone/bitcoin,instagibbs/bitcoin,apoelstra/bitcoin,namecoin/namecore,bitcoinknots/bitcoin,qtumproject/qtum,anditto/bitcoin,midnightmagic/bitcoin,prusnak/bitcoin,lateminer/bitcoin,Sjors/bitcoin,ElementsProject/elements,pataquets/namecoin-core,practicalswift/bitcoin,cdecker/bitcoin,jnewbery/bitcoin,tecnovert/particl-core,practicalswift/bitcoin,jlopp/statoshi,namecoin/namecoin-core,sstone/bitcoin,lateminer/bitcoin,bitcoinsSG/bitcoin,jambolo/bitcoin,MarcoFalke/bitcoin,lateminer/bitcoin,GroestlCoin/bitcoin,sipsorcery/bitcoin,n1bor/bitcoin,MarcoFalke/bitcoin,Sjors/bitcoin,pstratem/bitcoin,domob1812/namecore,bitcoin/bitcoin,achow101/bitcoin,alecalve/bitcoin,fujicoin/fujicoin,fanquake/bitcoin,GroestlCoin/GroestlCoin,pstratem/bitcoin,jamesob/bitcoin,fujicoin/fujicoin,jamesob/bitcoin,qtumproject/qtum,jamesob/bitcoin,litecoin-project/litecoin,Xekyo/bitcoin,fujicoin/fujicoin