Refactor SelectCoinsMinConf() and add unit tests.

AvailableCoins() makes a vector of available outputs which is then passed to SelectCoinsMinConf().  This allows unit tests to test the coin selection algorithm without having the whole blockchain available.
Move the random_shuffle call back into SelectCoinsMinConf() so we can unit test it.
Test that the coin selection code is suitably random, and add tests re. sub-cent change.
Preserve the shuffled order of coins with equal value to give more randomized coin selection.
Fix coin selection to only include change when it's necessary.
introduce a new StartShutdown() function, which starts a thread with Shutdown() if no GUI is used and calls uiInterface.QueueShutdown() if a GUI is used / all direct uiInterface.QueueShutdown() calls are replaced with Shutdown() - this ensures a clean GUI shutdown, even when catching a SIGTERM and allows the BitcoinGUI destructor to get called (which fixes a tray-icon issue and keeps the tray-icon until Bitcoin-Qt exits)
merge toggleHidden() code into showNormalIfMinimized() to extend the functionality, but keep a simpler toggleHidden() for use in SLOT() macro
re-work optionsdialog to a tabbed UI based on an ui-file

- extend network options with a SOCKS version selection
- changing "Unit to show amounts in:" now also updates the unit used in the transaction fee box
- string updates
- link Apply button and OK button when enabling or disabling them
- use LookupNumeric() from netbase to verify proxy address (via an EventFilter)
- change proxy address field to QValidatedLineEdit and add visual feedback
- add a status label used for displaying a message for invalid proxy addresses
- allow usage of IPv6 address as proxy address
- added warning message when enabling / disabling SOCKS proxy
Merge pull request #1433 from Diapolo/tabbed_optionsdialog

GUI: re-work current options dialog to a tabbed layout and use an UI-file
update translation files (fetched from Transifex) and remove translation for fr_FR, which was removed / renamed on TX
Update bitcoinstrings from core and English source translation file

This is necessary as any strings have changed since last time.

Also the python script used to extract bitcoinstrings.cpp, extract_strings_qt.py
now sorts the strings before generating the output file. This results in more
deterministic output and thus smaller diffs.
Merge pull request #1449 from laanwj/2012_06_bitcoinstrings

Update bitcoinstrings.cpp and English source translation file
Merge pull request #1448 from Diapolo/2012-06-13_translation_updates

update translation files (fetched from Transifex - 2012-06-13)
Merge branch 'refactor_coinselect' of https://github.com/luke-jr/bitcoin
Merge pull request #1420 from Diapolo/extend_showNormalIfMinimized

GUI: merge toggleHidden() code into showNormalIfMinimized()
URI-handling code update: added safety checks and tray-notifications
Reorganize tray icon menu into more logical order

The current order of menu options in the tray menu doesn't really match expected usage patterns, this commit changes it to more logical order.

- Toggle show/hide first (unchanged)
- Then, send/receive coins actions, which are the critical functionality of bitcoin
- Then, sign/verify message
- Then finally the options, and closing with the debug window
Merge pull request #1439 from Diapolo/ClientShutdown

re-work Shutdown() function
Merge pull request #1002 from Diapolo/URL-handling_2

URI-handling code update: added safety checks and notifications
Fix build of testcases after commit 0f10b21719e1b0d9683a142f0a7105e65f095694