A vector and tensor polarimeter for high-energy deuterons