Device for measuring the inertia tensor of a rigid body