Heavily optimized the Fluid Calculation code.

Reduced buffer sizes and made buffers update only when the fluid
settings change.