CLEREZZA-850: Made Resource (except BNode) and Expression implementations serializable