The XMM Cluster Survey:Optical analysis methodology and the first data release