Laser Cooling with an Intermediate State and Electronic Structure Studies of the Molecules CaCs and CaNa