Change to the goal with the name goal-name, i.e. make it the
current goal. However, if goal-name is nil or is not supplied, then
it defaults to the next-to-top goal, i.e., the second goal in the
stack of goals. If end-flg is supplied and not nil, then move the
current goal to the end of the goal stack; else merely swap it with
the next-to-top goal. Also see documentation for cg.