Energy2D: Fix various bugs related to parts and sensors

Caused mainly by incorrect D3 data binding.