Capacity design and topology optimization of rocking spine systems for nonlinear earthquake response