asn1ct_check: Let asn1_error/3 throw its result

Since most calls to asn1_error/3 throw its result, it makes more
sense to let asn1_error/3 itself throw the error tuple. Add the
return_asn1_error/3 to return the error tuple to use when we don't
want to throw it.
asn1ct_check: Remove unreachable clauses handling {identifier,_,_}

A named number list as used for ENUMERATED and INTEGER can never
have an {identifier,...} tuple in its third position like this:

   {'NamedNumber',Id,{identifier,_,_}}

because asn1ct_parser2:parse_NamedNumber/1 will always replace
an identifier tuple with an #Externaluereference{} record.
asn1ct_check: Rewrite error checking for INTEGER and BIT STRING

The error checking code for INTEGER and BIT STRING was broken,
since it built an error tuple that was never returned.

Rewrite the error checking code, sharing most of the code between
INTEGER and BIT STRING. Make sure that we test for both duplicated
names and number, as well as for negative bit numbers for
BIT STRING.

This rewrite will eliminate two dialyzer warnings for unmatched
returns.
asn1ct_check: Clean up error checking for INSTANCE OF

This will also eliminate a dialyzer warning for unmatched returns,
and increase the coverage.
Clean up reporting of errors in IMPORTS
shell_SUITE: Give bs_match_bin_SUITE/1 more time

Compiled with --enable-native-libs, 2 minutes may not be enough
time on a slow computer to finish bs_match_bin_SUITE/1.
prim_file_SUITE: Remove the short 5 seconds timetrap timeout

Several tests cases would typically fail because of a timetrap
timeout on our older test machines running with a Linux kernel
with a lower version than 2.6.30 and the ext3 file system.

In http://lwn.net/Articles/328363/, the author desribes peformance
issues with ext3 that were fixed in 2.6.30.

Since common_test nowadays has a default timetrap timeout, there
is no need to explicitly set a timeout in each test case (except
for prolonging the default timeout).
Attempt to provide more information if a test case fails
cover_SUITE:reconnect/1: Let the other side initiate the disconnect

The reconnect/1 test starts another node and takes down the connection
to it for a while. However, it has been in observed in our daily builds
that sometimes a "spontaneous" re-connection occurs.

I think that it because of the call to rpc:cast/3 which internally
will set the group leader for the remote process to a process on
the test_server node. It seems that sometimes the group_leader/2
call will re-establish the connection. Unfortunately, I have not
been able to force this to happen by inserting delays in the rpc
module, so it it still just an hypothesis.

However, letting the other node do the disconnection does seem to fix
the problem and intuitively that should be safer way to do it because
the group_leader/2 call and the disconnection will be executed
sequentially on the same node instead of concurrently from two
different nodes.
Change telnet logging behaviour

OTP-11690
Get ct_telnet_client to print all data from server to log
Add test cases and fix some problems with logging and with the telnet client
Change encoding for XML files to utf-8

These are some files that were erronously missed earlier:

   erts/doc/src/time_correction.xml
   lib/crypto/doc/src/crypto_app.xml
   lib/snmp/doc/src/snmpa_mib_data.xml
   lib/snmp/doc/src/snmpa_mib_storage.xml
Remove "coding: utf-8" from test files

UTF-8 is now the default encoding and should no longer be
specified. These have probably been merged from maint earlier and the
coding statement was missed.

   lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl
   lib/diameter/test/diameter_codec_test.erl
   lib/ssh/test/ssh_unicode_SUITE.erl
Clarify the reference manual regarding source file encoding
Properly collect variables in map expressions in v3_core

Reported-by: José Valim
Clean up the types of cerl

The introduction of c_map and c_map_pair was not done properly. In
particular, the definition of ctype() and an important Edoc comment
were not up-to-date.

While at it,
 - some more types were cleaned up and exported so as to be used
   in core_parse.hrl and
 - some obviously dead code was removed (the type/1 function does
   not return 'nil', which in turn simplified a clause in the code
   of meta_1/2).
Restore the alphabetical order of Core Erlang records

The introduction of c_map{} and c_map_pair{} unnecessarily broke the
alphabetical order of Core Erlang records. They were probably placed
at the end of the file so as to use other records as types. There is
really no need for this since 'cerl' contains appropriate definitions
of types that can be used for this purpose.

While at it, a type declaration to the c_binary{} definition was added.
Merge branch 'hb/clarify_encoding'

* hb/clarify_encoding:
  Clarify the reference manual regarding source file encoding
Merge remote branch 'origin/peppe/common_test/telnet_logging_final'

* origin/peppe/common_test/telnet_logging_final:
  Add test cases and fix some problems with logging and with the telnet client
  Get ct_telnet_client to print all data from server to log
  Change telnet logging behaviour

OTP-11690