What is the difference between ductile and brittle deformation in rocks, and what factors control which type occurs?