Spinor model of a perfect fluid