I wonder if it is ballast weight on the roof rack, possibly to simulate increased center of gravity for Model X (along with whatever was mounted in back seats).
They could be evaluating driving dynamics of the AWD system.
Edit: Also looks like the fender lining has been removed, at least for the rear right wheel (third photo)
I agree that those are wheel torque, speed and position sensors wrapped into one and that you have spotted the (we are not doing) MS AWD test mule. Until certified, Tesla is probably required to have a big red panic button when working on driveline modifications which further bolsters the idea of their being another motor up front. The box is probably a battery to power that motor independently so as to not have to deal with traction battery peak current usage while exploring the limits of four wheel two motor traction events on dry tarmac.
Awesome find and thank you very much for posting pics