Fix rabbit serde and add tests; fixes #794