game engine: implement hitMaterial for collision and ray sensors

Reviewed By: moguri, kupoman

Differential Revision: https://developer.blender.org/D167