when did krakow become the capital of poland