Make classes immutable

As recommended in Moose best practices [1], this allows optimization
and inlining that significantly speeds up object creation and
attribute accessors, at the cost of giving up the metaclass API.

[1]: https://metacpan.org/pod/Moose::Manual::BestPractices#namespace::autoclean-and-immutabilize
Make `is_vector` override work with immutable classes

This is probably an artifact of how optimizations are done on
immutabile classes, because it's not a problem otherwise. But it is
required in this case to resolve method conflicts, as described in the
manual [1].

[1] https://metacpan.org/pod/Moose::Manual::Roles#METHOD-CONFLICTS and
    https://metacpan.org/pod/Moose::Manual::Roles#METHOD-EXCLUSION-AND-ALIASING
Use custom Moose type constraints for attributes (fixes #23)
Provide inlined versions of custom types
Use scalars in Perl rep of list for atomic vectors of length 1

The idea is that in R, `1:3`, and `list(1, 2, 3)` can often be used
interchangeably, even though the list is really composed of three
integer vectors, each of length one. Now, both will have native Perl
representation of `[1, 2, 3]`.

This only applies to elements that are atomic vectors. An element of
type list will always be represented as an array reference:

`list(list(1), list(2), list(3))` -> `[ [ 1 ], [ 2 ], [ 3 ] ]`