Czechs beat Spain to secure Davis Cup win