asn1ct_imm: Break out the rule for string alignment

Break out the the rules for determining whether a string should
be in aligned so that it can be reused for encoding.
Encode SEQUENCE OF / SET OF using a list comprehension

Using a list comprehension will simplify both the code generator
and the generated code. Also, if there is an ObjFun argument in
the host function, the BEAM compiler will make sure it is only
passed to the generated list comprehension function if it is
actually used.
Remove code for handling an object/object set reference in SEQUENCE

An field in a class that references an object or object set is not
allowed to be referenced directly from within a SEQUENCE.
asn1ct_constructed_per: Simplify gen_enc_line() and friends

The first clause of gen_enc_line() allows us to pass in [] as
the value for Element; if we modify the only caller that passes
[] to pass an actual expression we can remove the first clause.
Furthermore, since the Pos argument was only used by the first
clause, we can remove the Pos argument.

We can also remove the first clause in gen_enc_component_optional(),
since the code in its body is exactly the same as in the following
clause.
Teach asn1ct_func to dynamically generate run-time functions
Refactor encoding of REAL

To facilitate optimizing PER encoding using an intermediate
format, we must change asn1rtt_real_common:encode_real/1 so that
it only returns the encoded binary.
Clean up handling of extension addition groups

Break out the code to a separate function to make it more readable.

Also avoid hard-coding the name of the value to use as "Val1" as
it may not be true in the future.

Instead of using a list comprenhension like this:

  case [X || X <- [element(5, Val),element(6, Val)],
        X =/= asn1_NOVALUE] of
    [] -> ...;
    _ -> ...
  end

use an orelse chain:

  case element(5, Val) =/= asn1_NOVALUE orelse
       element(5, Val) =/= asn1_NOVALUE of
    false -> ...;
    true -> ...
  end
SeqOf: Add more tricky SEQUENCE OF tests
asn1_SUITE: Remove off-topic (and slow) smp/1 test case

The smp1/1 test case seems test how well the SMP emulator can
parallelize tasks, not any functionality in the asn1 application
that is not tested in other tests.
Extend the test for parameterized information objects
Remove broken support for multiple UNIQUE

According to the ASN.1 standard, having multiple UNIQUE in class
is allowed. For example:

  C ::= CLASS {
    &id1 INTEGER UNIQUE,
    &id2 INTEGER UNIQUE
  }

In practice, no one uses multiple UNIQUE.

The ASN.1 compiler will crash if a class with multiple UNIQUE
is used, but the backends have half-hearted support for multiple
UNIQUE in that they generate helper functions similar to:

getenc_OBJECT_SET(id1, 42) ->
  fun enc_XXX/3;
...

Since we have no plans to implement support for multiple UNIQUE
(no one seems to have missed it), simplify the helper functions
like this:

getenc_OBJECT_SET(42) ->
  fun enc_XXX/3;
...
PER/UPER: Fix encoding of an object set with multiple inlined constructs

Also extend the test suite with more tests of inlined constructs
in object sets.
Test OPTIONAL and DEFAULT for open types
BER: Handle multiple optional SEQUENCE fields with table constraints
Improve tests of deep table constraints
Clean up checking of objects
UPER: Optimize complete/1
Optimize the generated encode/2 function

Use 'try' instead of 'catch', and don't match anything that
cannot actually be returned from the generated encoding code.
PER,UPER: Get rid of unused 'telltype' argument in decoding functions
Refactor decoding of components of SEQUENCE OF / SET OF

As a preparation for rewriting handling of table constraints,
we must make sure that code for decoding a SEQUENCE OF / SET OF
can be be contained in a single clause of a function; thus, we
must not output the helper function for decoding of each component
directly following the code that follows it. Use asn1ct_func:call_gen/3
to delay outputting the helper function.