Relaxation and the Computation of Effective Energies and Microstructures in Solid Mechanics