Implement the submit mode for getblocktemplate

Add the missing processing for the "submit" mode of getblocktemplate. This is required for stratum servers that do not use submitblock for some reason.

Note: I have also a version with line 400 being: strMode = "submit";
But it does not seem to be required.
Update rpcmining.cpp

Removed extraneous return.
Merge pull request #1 from danbi/patch-1

Implement the submit mode of getblocktemplate.
Remove unused variables and extra prints
(temporary) remove reference to TxMessage
Make ebug output independent of QT
Update makefile.bsd
Merge pull request #2 from danbi/patch-2

Patch 2
Update library dependencies
Update copyrights
Implement workaround for http://bitcoin.org/may15
Implement proper block size for getblocktemplate.
Clean up unused variables and comments.
Implement additional checks in GetHash() and CheckBlock() to account for
different hash algorithms.
More GetHash(), CheckBlock() and totalCoins fixes.
Fix coin mechanics calculations.
Borrow code from MintCoin to fix the getbalance and getbalance '*' RPC
calls and peer node storage.
Fix dev/foundation and fee/contribution terminology.
Reimplement damaged tx-message RPC interface.
Update wallet version.
Update client version, mingw build environment and (temporary) remove
permanent node.
QT GUI fixes, images, tooltips.