Extend persisted objects with PersistedObject

Previously, we were defining a singleton `id` method directly on
persisted objects, which was causing them to be unmarshalable with
`Marshal.dump` (as noted in #17). Extending objects with a module allows
them to be marshalable with `Marshal.dump`, but `YAML.dump` is still
out. I don't think this can be helped.
Remove extraneous `if` statement

I think this was left over from a previous version of the `serialize`
method which had a lot more logic in it.