build: osx: Fix incomplete framework packaging for codesigning

Starting with 10.9, Framework versions must be signed individually, rather
than as a single bundle version, in order to be properly codesigned. This
change ensures that the proper plist files and symlinks are present prior to
packaging.
Move g_signals.SetBestChain(..) below SyncWithWallets
Track modified size in TxMemPoolEntry so that we can correctly compute priority.
Make script_{valid,invalid}.json validation flags configurable
netbase: Make SOCKS5 negotiation interruptible

Avoids that SOCKS5 negotiation will hold up the shutdown process.

- Sockets can stay in non-blocking mode, no need to switch it on/off
  anymore
- Adds a timeout (20 seconds) on SOCK5 negotiation. This should be
  enough for even Tor to get a connection to a hidden service, and
  avoids blocking the opencon thread indefinitely on a hanging proxy.

Fixes #2954.
Catch error when done reading files
Merge pull request #4758 from theuni/osx-dmg-codesign-rebase

build: osx: Fix incomplete framework packaging for codesigning
Merge pull request #4876

6022b5d Make script_{valid,invalid}.json validation flags configurable (Pieter Wuille)
Merge pull request #4896

07d5287 Catch error when done reading files (Suhas Daftuar)
Bugfix: bitcoin-tx: scriptPubKey may be null, so accept outscript=<n>:
bitcoin-util-test: Test bitcoin-tx with null scriptPubKey
cleanup new script files (no code changes)

- add missing header end comments
- ensure alphabetical ordering
- update copyright year and license
Merge pull request #4881

2d79bba cleanup new script files (no code changes) (Philip Kaufmann)
Merge pull request #4909
Merge pull request #4817

c26649f Track modified size in TxMemPoolEntry so that we can correctly compute priority. (Alex Morcos)
Bugfix: Add missing equals-sign to Travis config
Merge pull request #4798

d920f7d Move g_signals.SetBestChain(..) below SyncWithWallets (Cozz Lovan)
Merge pull request #4919

21b7add Bugfix: Add missing equals-sign to Travis config (Luke Dashjr)
Fixing compiler warning C4101

Github-Pull: #4856
Merge pull request #4869

6050ab6 netbase: Make SOCKS5 negotiation interruptible (Wladimir J. van der Laan)