Apparatus and method for producing dispersions and solids