Spain arrests 12 tied to train bombings