MODE-2294: Make server side classes serializable

Adds serialization to the server side classes.
`JcrRepository` is not Serializable so this won't work.