Dirichlet and Neumann Problems for String Equation, Poncelet Problem and Pell-Abel Equation