Race leader Primoz Roglic survived a huge crash on stage 19 of the Vuelta a Espana, before recovering to maintain his general classification lead.