Fix rabbit serde and add tests; fixes #794

This might break actual Rabbit usage, if it really needs its whacky types to be used.