Fix bug #152360. The xml5 serializer should be using the hint it was given about the revision id. It was accidentally overwriting the revision_id to None when the data did not hold a valid value. Add tests that this is done properly, at both the Repository level and at the xml5 layer.