Also switch the (unused) verification code to low-s instead of even-s.

a81cd968 introduced a malleability breaker for signatures
(using an even value for S). In e0e14e43 this was changed to
the lower of two potential values, rather than the even one.
Only the signing code was changed though, the (for now unused)
verification code wasn't adapted.
Fix script test handling of empty scripts

Previously an empty script would evaluate to OP_0
Test CHECKMULTISIG with m == 0 and n == 0
script: add CScriptNum class

This class holds an int64_t and replaces the use of CBigInt for script
integrals.
script: switch to CScriptNum usage for scripts
script: switch outside users to CScriptNum
script: remove bignum dependency
script: add additional script tests
script: Add test for CScriptNum

Because this class replaces some usages of CBigNum, tests have been added to
verify that they function the same way. The only difference in their usage is
the handling of out-of-range numbers.

While operands are constrained to [-0x7FFFFFFF,0x7FFFFFFF], the results may
overflow. The overflowing result is technically unbounded, but in practice
it can be no bigger than the result of an operation on two operands. This
implementation limits them to the size of an int64.

CBigNum was unaware of this constraint, so it allowed for unbounded results,
which were then checked before use. CScriptNum asserts if an arithmetic
operation will overflow an int64_t, since scripts are not able to reach those
numbers anyway. Additionally, CScriptNum will throw an exception when
constructed from a vector containing more than 4 bytes This mimics the previous
CastToBigNum behavior.
Split up CheckBlock in a block and header version
Split AcceptBlockHeader from AcceptBlock.

Also modify some connection logic to deal with non-full blocks in the index.
don't use sed's -i option to stay posix compliant

POSIX does not define sed's -i option. To stay as portable
as possible we should not relay on it.
doc: remove specific mention of boost 1.55

There is no need to use any specific version of boost on Linux/Unix.
Even 1.37 should still work.

Also the mention of boost-dev doesn't belong after adding oldstable.
Remove it. libboost-all-dev is already mentioned earlier.
Merge pull request #4120

dbe8f75 don't use sed's -i option to stay posix compliant (Fabian Raetz)
Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants
Let tx (in)valid tests use any SCRIPT_VERIFY flag

Previously only P2SH could be set.
add DEFAULT_TRANSACTION_FEE constant in wallet

- as this is a shared Core/GUI setting, this makes it easier to keep them
  in sync (also no new includes are needed)
rpc: add `getblockchaininfo` and `getnetworkinfo`

Adds two new info query commands that take over information from
hodge-podge `getinfo`.

Also some new information is added:
- `getblockchaininfo`
  - `chain`: (string) current chain (main, testnet3, regtest)
  - `verificationprogress: (numeric) estimated verification progress
  - `chainwork`
- `getnetworkinfo`
  - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
Remove NumBlocksOfPeers

Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.

In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.

From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
qt: periodic translations update