Three-fluid magnetohydrodynamical simulation of plasma focus discharges