Avoid crash with namespaces and multiple_archives

If allow_multiple_archives is used, a model namespaced Foo::Bar would
create a line containing an expression archived.foo/bar_id which
causes a crash in copy_self_to_archive. This patch fixes the problem
by using archived.bar_id and dropping the namespace.

Also deriving Foo::Bar from Foo::Bar::Archive is fixed for the get_klass* methods.