Fixes to builds of Unit Tests and also to Unit Tests of Alerts and Darksend.

Issues:

1. darkcoin-qt_test Unit Tests no longer build due to multiple declarations of main().
2. Code does not build on OSX Mavericks due to change to libc++ standard library.
3. Alert Unit Tests cause core dump if earlier tests fail. Accesses null pointer.
4. Darksend Unit Tests no longer build due to recent RC3 updates.

Fixes:

1. bitcoin-qt.pro updated to allow building of Unit Tests. Also library dependencies for OSX changed to homebrew defaults. Documentation updated to reflect this. Recommendations for MacPorts added.
2. Created patch in contrib/homebrew to allow building on OSX Mavericks. Documentation updated to reflect the change.
3. Check for r.size() > 0 before running last two tests in alert_tests.cpp.
4. Change function calls and expected results for vote() in darksend_tests.cpp.

Builds tested on Ubuntu and Mac OSX Mavericks (homebrew). Successful builds/execution of 

darkcoin-qt
darkcoin-qt_test
darkcoind
test_darkcoin

Running the Unit Tests reveals the following errors which I will raise as a separate issue and investigate.

Running 73 test cases...
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(129): error in "AlertApplies": check alerts[0].AppliesTo(1, "") failed
test/alert_tests.cpp(130): error in "AlertApplies": check alerts[0].AppliesTo(70001, "") failed
test/alert_tests.cpp(131): error in "AlertApplies": check alerts[0].AppliesTo(1, "/Satoshi:11.11.11/") failed
test/alert_tests.cpp(133): error in "AlertApplies": check alerts[1].AppliesTo(1, "/Satoshi:0.1.0/") failed
test/alert_tests.cpp(134): error in "AlertApplies": check alerts[1].AppliesTo(70001, "/Satoshi:0.1.0/") failed
test/alert_tests.cpp(136): error in "AlertApplies": check alerts[2].AppliesTo(1, "/Satoshi:0.1.0/") failed
test/alert_tests.cpp(137): error in "AlertApplies": check alerts[2].AppliesTo(1, "/Sato./test_darkcoin
Running 73 test cases...
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(126): error in "AlertApplies": check alert.CheckSignature() failed
test/alert_tests.cpp(129): error in "AlertApplies": check alerts[0].AppliesTo(1, "") failed
test/alert_tests.cpp(130): error in "AlertApplies": check alerts[0].AppliesTo(70001, "") failed
test/alert_tests.cpp(131): error in "AlertApplies": check alerts[0].AppliesTo(1, "/Satoshi:11.11.11/") failed
test/alert_tests.cpp(133): error in "AlertApplies": check alerts[1].AppliesTo(1, "/Satoshi:0.1.0/") failed
test/alert_tests.cpp(134): error in "AlertApplies": check alerts[1].AppliesTo(70001, "/Satoshi:0.1.0/") failed
test/alert_tests.cpp(136): error in "AlertApplies": check alerts[2].AppliesTo(1, "/Satoshi:0.1.0/") failed
test/alert_tests.cpp(137): error in "AlertApplies": check alerts[2].AppliesTo(1, "/Satoshi:0.2.0/") failed

*** 15 failures detected in test suite "DarkCoin Test Suite"
shi:0.2.0/") failed

*** 15 failures detected in test suite "DarkCoin Test Suite"


More Darksend Unit Tests to come! ;-)