Spectral methods for matrix rigidity with applications to size-depth tradeoffs and communication complexity