set klass for proxies
very basic serialization module

Include Telecine::Serializable to be registered in the type registry.
The type registry acts as a whitelist so only the designated classes can
be instantiated. This is more secure than Marshal.

Implement tc_dump to have custom serialization. It should return a
primitive that backend serializers can serialize, eg array, hash,
string, number. The default implementation of tc_dump simply returns self.

Implement tc_load for custom loading. This should return an instance of
the unserialized class given a primitive. The default implementation
just returns the primitive.

tc_dump and tc_load both take an options hash that can be used to pass
context down the chain.
add a Serializer class

This takes care of annotating primitives with type information so they
can be sent to the correct classes on the other end. It supports
multiple backends and an options hash to be passed down the chain.

If a registered name cannot be found for the annotated name in the
representation, the primitive is returned unaltered. Future options
might allow raising an exception instead.

Also rename tc_load and tc_dump to from_primitive and as_primitive
respectively.
change default serializer backend to json

Safer that Marshal, avoids cheating with Marshal.load, and easier to
read.

In practice MessagePack is probably a better choice than json.
move time serializer to its own file
add some documentation for Serializable
use class_eval to add serialization to Time
add experimental string serialization

This is a very inefficient demonstration of annotating serialized strings
with their encoding. Not included by default.
require serializer
use strings as registry keys

Symbols are never garbage collected, so they shouldn't be used for
arbitrary keys.
very rough draft of a graph flattening serializer

Mostly inspired by kryo.
add configurable backend

Marshal refuses to dump hashes with default procs, so gotta figure out a
way around them.
remove serialization backends

There's no need for this to try to integrate serialization. It should
focus on building object graphs instead.
Use a single counter for object ids

We can use a single counter for object ids instead of [class, id]
pairs. No need to have separate counters for each class.

Simplifies the implementation and makes the output smaller.
simplify primitive format

Instead of segment arrays with class_id => object_id => object
hierarchies, rely on ordered hashes and invert the class_id and
object_id levels. So object_id is the top level, the hash item order
implies dependencies, and the last item in the hash is the return value
of load.

Because of recursion, the ids count down and the final object will
usually have id 1.

{ 2 => { "Foo" => 'bar' }, 1 => { "FooBar" => [2, "baz"] }

Creating and linking to other objects in the can is up to the
serializers. The "FooBar" serializer must know that 2 means object 2
instead of Fixnum 2.
no need to require json
rename Kryo to Cannery
initialize_copy for Cannery

This makes copying a Cannery easy:

c2 = c.dup

c2 inherits and dups the registry state of c. This allows using a
Cannery instance as a factory and customizing generated factories
individually.