Algebraic Curves And Flag Varieties In Solutions Of The Kp Hierarchy And The Full Kostant-Toda Hierarchy