Define cartesian and cocartesian squares

Thanks to Fred Rohrer
http://stacks.math.columbia.edu/tag/001U#comment-153
http://stacks.math.columbia.edu/tag/0025#comment-154
http://stacks.math.columbia.edu/tag/001V#comment-155