Direct3D 9.0 Improvements

Added proper d3d_primitive_* and draw_primitive_* batching so no more
segfault. Also got the house effects demo working and added light state
memorization to the Direct3D 9.0 device manager.