Bounds for equidistant codes and partial projective planes