These are a subset of my bitcoin-4diff patches have been well-tested against the latest release version.
Cache the RPC user and password in strRPCUser/strRPCPass so that they don't need to be extracted on each RPC call.
Fix a memory leak in the pthreads version of CreateThread.