“It is elementary that a declaration cannot be granted by consent or by default. There must be a proper examination by the court of the relevant facts, assessed in the light of the applicable law, before a judge can be satisfied, as he must be if the relief sought is to be granted, that the claim for the declaration is indeed made out.”