stdlib: Try fix fluctuating test cases in ets_SUITE

by removing slave node creation and instead create remote pids, ports and refs
synthetically using binary_to_term.

Memory leak checks were sometimes failing due to mutating system ETS tables
caused by slave node communication.
erts: Use native atomics and fallback spinlock to mutex for VALGRIND

An attempt to speedup valgrind
test_server: Increase timeout for VALGRIND
asn1 tests: Remove obsolete duplicates of ASN.1 specs
asn1_SUITE: Don't add priv_dir to the code path

All generated and compiled code are now put into separate sub
directories below priv_dir, so there is no point in adding
priv_dir to the code path.
asn1_SUITE: Shorten the path to case-specific directory

On Windows, there is a limit to the number of characters in a
filename. Therefore, we don't want unnecessarily use any longer
path than necessary for case-specific directory. Since all test
cases that put anything into priv_dir is asn1_SUITE, it is not
necessary to include "asn1_SUITE" as part of the case-specific
directory.
Add NullTest

Was broken in some backends in R15. Make sure that we will notice
if it breaks again.
per,uper: Fix breakage of compilation of InformationFramework

Commit f16f43446a04c459486356c0b4ad517cc9201895 broke compilation
of InformationFramework for per and uper.
der: Correct code generation for checking of empty sets

The ASN.1 compiler would generate an Erlang module with
incorrect syntax for:

T DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

  Empty ::= SET {
  }

  S ::= SEQUENCE {
    e Empty DEFAULT {}
  }

END
Smoke test the 'der' option
Do not use writev on osx snow leopard

writev will for large files return 0 indefinetely causing
the efile driver to go into an infinite loop.
BER: Fix broken table constraints inside a SET OF/SEQUENCE OF
invoke_read_line now remembers read_ahead settings
Eliminate use of obsolete size/1 in generated code

It is recommended to use byte_size/1 or tuple_size/1 instead of
size/1.
asn1ct: Eliminate use of obsolete size/1

Also teach otp_SUITE:call_to_size/1 that calls to size/1 is no
longer allowed within the asn1 application.
Add application_opt() request_errors

Configuring the value 'callback' all errors detected in incoming
requests to result in a handle_request callback. The default value
'answer_3xxx' is the previous behaviour in which diameter answers
protocol errors without a callback.
Minor suite simplification
Add 3xxx suite for testing application_opt() request_errors
Be less brutal in setting Result-Code/Failed-AVP

When receiving a request for which errors have been detected during
decode, diameter previously used the errors list in the decoded
diameter_packet record to unconditionally set Result-Code and Failed-AVP
in the outgoing answer. It wasn't particularly delicate in doing so
however and would happily set a 5xxx Result-Code even if a
handle_request callback returned an answer-message, leading to an encode
error. This behaviour became even less endearing as of commit ac452e28,
which made it possible to handle_request to take place even for protocol
errors. (ie. When a callback typically should return an answer-message.)

This commit fixes the behaviour by only setting a value that's
appropriate for the answer in question, either a 3xxx or a 5xxx,
depending on if the answer's an answer-message or not. It also allows
handle_request to prevent diameter from setting anything by setting
errors = false in a returned diameter_packet. Ideally it should have
been errors = [] but the empty list is the default value for the errors
field and changing the default (ideally there shouldn't have been one)
would require recompilation of all modules including diameter.hrl:
choose the less attractive 'false' to avoid such backwards
incompatibility.

The request reception is also refactored somewhat to shorten some call
chains.
Minor traffic suite fix