Multiscale Mechanics and Optimization of Gastropod Shells