After the failed union of Sweden and Norway of 1319–1365, the pan-Scandinavian Kalmar Union was instituted in 1397. Denmark and Norway remained in the Kalmar Union until what year?