Rework the pattern encoding.

This commit makes significant changes to the leornian_memory.h bit
manipulation macros.

1. The POSITION type was removed from SET_TYPE (reducing it to 1 bit
wide). This type is unnecessary because every "SAMPLE" (now "PATTERN")
encoding will have a 64-bit pattern attached to it for the position.
There is no need to specify a POSITION pattern when its size and
parameters are already known.
2. The conditional branching has been reworked; now, there is only a
single branch with a single child. The expected bit value of the
following position pattern resultant bit is also encoded via
SET_BRANCH(). This change was made because in many situations there will
be no information for the other branch. In this case, UNDEF was used.
Instead of using UNDEF this simply eliminates an unnecessary branch,
favoring creating multiple branches when information is actually known,
instead of packing them into the same one.
3. Comments have been improved and reworked for the new code.
Improve and clarify comments and their wording.
Rework how memory is managed in leo().

This commit streamlines and clearly defines memory management in leo().
No memory management is done in leo(), however memory allocations are
kept track of in leo(). This commit makes pattern() allocate all the
memory it needs, storing the pointers in leo()'s stack. This reduces the
amount of malloc() and realloc() calls needed (previous allocations are
reused) in a thread safe way.

This commit also adds another buffer to maintain, the pattern code
buffer, which is the primary reason for streamlining. Like the parent
buffer, this buffer is allocated by pattern() and kept track of by
leo().

Extensive comments are added to document this information.
Use the new memory macros.

This commit updates pattern() to use the updated memory macros and the
corresponding standards.

Note that although it uses these macros, it uses them in a meaningless
way that needs to be refined for the memory model to be complete.
Specifically, it overwrites the last bit in the *code array, which is
useless.
Add a POSITION TYPE for SET_TYPE().

This commit adds the recently removed POSITION TYPE once more, because
each bit in a positional pattern can have a variable amount of
descriptors, i.e. the described bit needs to be explicitly stated. Note
that this is a different use case than the original intention of the
POSITION TYPE, which was to mark all positional bit patterns as type
POSITION.

In addition to the TYPE, a new set of SET_*() and TEST_*() macros are
added to set the 6 bit field for the bit position being described in the
positional pattern.