A MULTICOLOR PHOTOMETRIC STUDY OF THE GALAXY CLUSTER A2589: DYNAMICS, LUMINOSITY FUNCTION, AND STAR FORMATION HISTORY