Factor SerializeRef instances out of Mavlink implementation.