Make explicitly requested salvage operations keep going when there is an error.

In my tests corrupted wallets would often result in BDB dropping an error
just due to duplicate records being found, which appears harmless.
fixes #2506: mac binary with proper version and copyright meta-informations (Info.plist)

Due a bug in QT (https://bugreports.qt-project.org/browse/QTBUG-21267), the mac binary of the last release contains bulk meta informations.

The url-handler (bitcoin://) is also not working in current release

Should be fixed with this commit.

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
remove duplicate bitdb.Open() code from init

- remove code from step 7, which we already have in step 5 of init
Try moving database/ away in case of failure
Remove database/ after clean shutdown
Allow the default key to be unavailable

This solves the issue where no default key can be added after -salvagewallet.
Allow select()ing up to 1024 file descriptors on Windows
fix !O_NONBLOCK where ~O_NONBLOCK was meant

Using ! on a non-zero value will always return 0.

Also remove some duplicate and superfluous code in other places.
Print actual Win32 error that occurred on file creation failure.
Checking whether closing succeeds
Allow files to be opened for reading multiple times
Try to increase file descriptor rlimit if necessary

As the default can be too low, especially on OSX.
Merge pull request #2569 from sipa/win1024fd

Allow select()ing up to 1024 file descriptors on Windows
Accept negative -par values to leave N CPUs free.
Merge pull request #2349 from dserrano5/master

Accept negative -par values to leave N CPUs free.
Merge pull request #2568 from sipa/rlimit

Try to increase file descriptor rlimit if necessary
Merge pull request #2589 from sipa/win32ldberr

Some win32-leveldb related fixes
Merge pull request #2583 from laanwj/2013_04_netbase_bitfield

netbase: fix !O_NONBLOCK where ~O_NONBLOCK was meant
Don't announce to non-peer CNodes
Merge pull request #2595 from sipa/noannloc

Don't announce to non-peer CNodes