Who prepared for an invasion by a king who had Earl Skule Bårdsson as a rival?